diff options
author | Yorhel <git@yorhel.nl> | 2011-05-17 16:24:40 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2011-05-17 16:24:40 +0200 |
commit | 18e43c166feaaa8ae6b4183f1dd939cfcc3492f2 (patch) | |
tree | af5ed6fdd270ce6a49e69b720834c6a33fa6ad1c /lib/VNDB/Util/FormHTML.pm | |
parent | c07f9ab519afb936d4d346e73b129a0d34039361 (diff) |
Bugfix: Don't allow duplicate trait names/aliasses within the same group
This makes the denied trait listing useful again.
Diffstat (limited to 'lib/VNDB/Util/FormHTML.pm')
-rw-r--r-- | lib/VNDB/Util/FormHTML.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/VNDB/Util/FormHTML.pm b/lib/VNDB/Util/FormHTML.pm index 805467f6..21eeb980 100644 --- a/lib/VNDB/Util/FormHTML.pm +++ b/lib/VNDB/Util/FormHTML.pm @@ -36,9 +36,14 @@ sub htmlFormError { li mt '_formerr_maxlength', $field, $rule if $type eq 'maxlength'; li mt '_formerr_enum', $field, join ', ', @$rule if $type eq 'enum'; li mt '_formerr_wrongboard', $rule if $type eq 'wrongboard'; - li mt '_formerr_tagexists', "/g$rule->{id}", $rule->{name} if $type eq 'tagexists'; li $rule->[1] if $type eq 'func' || $type eq 'regex'; li mt "_formerr_tpl_$rule", $field if $type eq 'template'; + if($type eq 'tagexists') { + li; lit mt '_formerr_tagexists', "/g$rule->{id}", $rule->{name}; end; + } + if($type eq 'traitexists') { + li; lit mt '_formerr_traitexists', "/i$rule->{id}", $rule->{name}; end; + } } end; end 'div'; |