diff options
author | Yorhel <git@yorhel.nl> | 2011-12-29 16:05:31 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2011-12-29 16:05:31 +0100 |
commit | ce33c5933d9e83699fa0791d4dae72208d528953 (patch) | |
tree | f64d0b35279ad53639e523c3e559efea4675099b /lib/VNDB/Util | |
parent | 019f1424945aff4545c3a5083fb6330a942f4a3b (diff) |
Added duplicate check when adding VNs
Diffstat (limited to 'lib/VNDB/Util')
-rw-r--r-- | lib/VNDB/Util/FormHTML.pm | 17 | ||||
-rw-r--r-- | lib/VNDB/Util/LayoutHTML.pm | 2 |
2 files changed, 13 insertions, 6 deletions
diff --git a/lib/VNDB/Util/FormHTML.pm b/lib/VNDB/Util/FormHTML.pm index 21eeb980..13ec56f9 100644 --- a/lib/VNDB/Util/FormHTML.pm +++ b/lib/VNDB/Util/FormHTML.pm @@ -165,10 +165,12 @@ sub htmlFormPart { # Generates a form, first argument is a hashref with global options, keys: -# frm => the $frm as returned by formValidate, -# action => The location the form should POST to (also used as form id) -# upload => 1/0, adds an enctype. -# editsum => 1/0, adds an edit summary field before the submit button +# frm => the $frm as returned by formValidate, +# action => The location the form should POST to (also used as form id) +# upload => 1/0, adds an enctype. +# nosubmit => 1/0, hides the submit button +# editsum => 1/0, adds an edit summary field before the submit button +# continue => 2/1/0, replace submit button with continue buttons # The other arguments are a list of subforms in the form # of (subform-name => [form parts]). Each subform is shown as a # (JavaScript-powered) tab, and has it's own 'mainbox'. This function @@ -235,7 +237,12 @@ sub htmlForm { textarea name => 'editsum', id => 'editsum', rows => 4, cols => 50, $options->{frm}{editsum}||''; br; } - input type => 'submit', value => mt('_form_submit'), class => 'submit'; + if(!$options->{continue}) { + input type => 'submit', value => mt('_form_submit'), class => 'submit'; + } else { + input type => 'submit', value => mt('_form_continue'), class => 'submit'; + input type => 'submit', name => 'continue_ign', value => mt('_form_continue_ign'), class => 'submit', style => 'width: auto' if $options->{continue} == 2; + } end; end 'div'; } diff --git a/lib/VNDB/Util/LayoutHTML.pm b/lib/VNDB/Util/LayoutHTML.pm index 752f6728..7507d682 100644 --- a/lib/VNDB/Util/LayoutHTML.pm +++ b/lib/VNDB/Util/LayoutHTML.pm @@ -100,7 +100,7 @@ sub _menu { a href => '/g/links?u='.$self->authInfo->{id}, mt '_menu_mytags'; br; br; if($self->authCan('edit')) { - a href => '/v/new', mt '_menu_addvn'; br; + a href => '/v/add', mt '_menu_addvn'; br; a href => '/p/new', mt '_menu_addproducer'; br; } if($self->authCan('charedit')) { |