[- use Embperl::Form::Validate ; use File::Basename ; $r = shift ; my $langset = $r -> {language_set} ; $$langset -> Reset ; while ($rec = $$langset -> Next) { push @rules, [ -key => "category_$rec->{id}", -name => $rec -> {name}, 'emptyok', length_min => 5 ] ; push @keys, "category_$rec->{id}" ; } $epf = Embperl::Form::Validate -> new ([ -key => \@keys, -name => { de => 'eine Kategorie', en => 'one category' }, 'required', @rules, ]) ; $Embperl::Form::Validate::objects{'addsel'} = $epf ; -]

[= addsel1 =]

[$ if $r -> {user_id} $]

[= addsel_upd =]

[$else$]

[= addsel_login1 =] [= addsel_login2 =] [= addsel_login3 =]

[$endif$] [# DEBUGGING: [! use Data::Dumper; !]
[+ Dumper $ENV{SERVER_NAME}, $ENV{SERVER_PORT}, [keys %$r] +]
#] [#
[= addsel2 =]
[= addsel3 =]

[- $rec = $r -> {language_set}[$row] -]
[+ $rec -> {name} +]:


    
#]