diff options
author | Yorhel <git@yorhel.nl> | 2009-04-01 08:49:59 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-04-01 08:49:59 +0200 |
commit | 33c6bd207473e8ce6ddfc0d19b34ccb139aa8521 (patch) | |
tree | d5714b79b3e02c77d78f43a1f4b34f7194068b14 /lib/VNDB/Util/FormHTML.pm | |
parent | 61c4d04980dc0376cf0032364a5952f8d828837f (diff) | |
parent | f35175b04fc9f54680ad2578a994177e4d280b09 (diff) |
Merge branch 'beta'2.3
Conflicts:
data/docs/4
Diffstat (limited to 'lib/VNDB/Util/FormHTML.pm')
-rw-r--r-- | lib/VNDB/Util/FormHTML.pm | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/lib/VNDB/Util/FormHTML.pm b/lib/VNDB/Util/FormHTML.pm index 75471830..17de6663 100644 --- a/lib/VNDB/Util/FormHTML.pm +++ b/lib/VNDB/Util/FormHTML.pm @@ -14,6 +14,7 @@ my %formerr_names = ( alias => 'Aliases', anime => 'Anime', desc => 'Description', + description => 'Description', editsum => 'Edit summary', gtin => 'JAN/EAN/UPC', lang => 'Language', @@ -33,7 +34,7 @@ my %formerr_names = ( platforms => 'Platforms', producers => 'Producers', released => 'Release date', - tags => 'Tags', + boards => 'Boards', title => 'Title', type => 'Type', usrname => 'Username', @@ -79,7 +80,14 @@ sub htmlFormError { li sprintf '%s should have at least %d characters', $field, $rule if $type eq 'minlength'; li sprintf '%s: only %d characters allowed', $field, $rule if $type eq 'maxlength'; li sprintf '%s must be one of the following: %s', $field, join ', ', @$rule if $type eq 'enum'; - li sprintf 'Wrong tag: %s', $rule if $type eq 'wrongtag'; + li sprintf 'Wrong board: %s', $rule if $type eq 'wrongboard'; + if($type eq 'tagexists') { + li; + lit $rule->{state} != 1 ? qq|Tag <a href="/g$rule->{id}">$rule->{name}</a> already exists!| + : qq|A tag <a href="/g$rule->{id}">with the same name</a> has been deleted in the past,| + .qq| please use <a href="/t/db">the discussion board</a> if you want it to be re-added.|; + end; + } li $rule->[1] if $type eq 'func' || $type eq 'regex'; if($type eq 'template') { li sprintf @@ -151,7 +159,9 @@ sub htmlFormPart { if(!$o{nolabel}) { td class => 'label'; if($o{short} && $o{name}) { - label for => $o{short}, $o{name} ; + label for => $o{short}; + lit $o{name}; + end; } elsif($o{label}) { txt $o{label}; } else { @@ -251,7 +261,9 @@ sub htmlForm { end; br; } + b "Don't forget! -> " if $options->{hitsubmit}; input type => 'submit', value => 'Submit', class => 'submit'; + b ' <-' if $options->{hitsubmit}; end; end; |