summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2015-09-20 21:08:54 +0200
committerYorhel <git@yorhel.nl>2015-09-20 21:08:54 +0200
commitb5c3aa020836541ef2e94812ab83e73de364abe4 (patch)
tree1f9d2a259b05ecbc3d3ebebdcfddd57edeed2c2e /lib
parent3070caa6043101bae8fddc297c4152a2f3832b29 (diff)
formValidate(): Let's just allow a '0' id - fix more errors
Looks like 0 is actually used often to indicate some special value. Affects basically all 'check all' boxes (had to modify some of those boxes because some used -1, but that wasn't a problem).
Diffstat (limited to 'lib')
-rw-r--r--lib/VNDB/Handler/Staff.pm4
-rw-r--r--lib/VNDB/Handler/ULists.pm6
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/VNDB/Handler/Staff.pm b/lib/VNDB/Handler/Staff.pm
index 27d9de66..fb4a22b3 100644
--- a/lib/VNDB/Handler/Staff.pm
+++ b/lib/VNDB/Handler/Staff.pm
@@ -201,7 +201,7 @@ sub edit {
$frm = $self->formValidate (
{ post => 'name', maxlength => 200 },
{ post => 'original', required => 0, maxlength => 200, default => '' },
- { post => 'primary', required => 0, template => 'uint', default => 0 },
+ { post => 'primary', required => 0, template => 'id', default => 0 },
{ post => 'desc', required => 0, maxlength => 5000, default => '' },
{ post => 'gender', required => 0, default => 'unknown', enum => [qw|unknown m f|] },
{ post => 'lang', enum => $self->{languages} },
@@ -212,7 +212,7 @@ sub edit {
{ post => 'aliases', template => 'json', json_fields => [
{ field => 'name', required => 1, maxlength => 200 },
{ field => 'orig', required => 0, maxlength => 200, default => '' },
- { field => 'aid', required => 0, template => 'uint', default => 0 },
+ { field => 'aid', required => 0, template => 'id', default => 0 },
]},
{ post => 'editsum', template => 'editsum' },
{ post => 'ihid', required => 0 },
diff --git a/lib/VNDB/Handler/ULists.pm b/lib/VNDB/Handler/ULists.pm
index 5d4fdcf8..b2e84ac3 100644
--- a/lib/VNDB/Handler/ULists.pm
+++ b/lib/VNDB/Handler/ULists.pm
@@ -201,7 +201,7 @@ sub votelist {
$own ? (footer => sub {
Tr;
td colspan => 3, class => 'tc1';
- input type => 'checkbox', class => 'checkall', name => 'vid', value => -1;
+ input type => 'checkbox', class => 'checkall', name => 'vid', value => 0;
txt ' ';
Select name => 'batchedit', id => 'batchedit';
option value => -2, '-- with selected --';
@@ -488,8 +488,8 @@ sub _vnlist_browse {
$own ? (footer => sub {
Tr;
- td class => 'tc1'; input type => 'checkbox', name => 'vid', value => -1, class => 'checkall'; end;
- td class => 'tc2'; input type => 'checkbox', name => 'rid', value => -1, class => 'checkall'; end;
+ td class => 'tc1'; input type => 'checkbox', name => 'vid', value => 0, class => 'checkall'; end;
+ td class => 'tc2'; input type => 'checkbox', name => 'rid', value => 0, class => 'checkall'; end;
td class => 'tc3_6', colspan => 4;
Select id => 'vns', name => 'vns';
option value => -2, mt '_rlist_withvn';