summaryrefslogtreecommitdiff
path: root/lib/VNDB/Util
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VNDB/Util')
-rw-r--r--lib/VNDB/Util/CommonHTML.pm2
-rw-r--r--lib/VNDB/Util/FormHTML.pm17
-rw-r--r--lib/VNDB/Util/LayoutHTML.pm2
-rw-r--r--lib/VNDB/Util/Misc.pm5
4 files changed, 17 insertions, 9 deletions
diff --git a/lib/VNDB/Util/CommonHTML.pm b/lib/VNDB/Util/CommonHTML.pm
index 60e7b237..73e2c5ba 100644
--- a/lib/VNDB/Util/CommonHTML.pm
+++ b/lib/VNDB/Util/CommonHTML.pm
@@ -84,7 +84,7 @@ sub htmlMainTabs {
if($type eq 'u' && $self->authCan('usermod')) {
li $sel eq 'del' ? (class => 'tabselected') : ();
- a href => "/$id/del", mt '_mtabs_del';
+ a href => "/$id/del", mt '_js_remove';
end;
}
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')) {
diff --git a/lib/VNDB/Util/Misc.pm b/lib/VNDB/Util/Misc.pm
index 5406fe06..04114483 100644
--- a/lib/VNDB/Util/Misc.pm
+++ b/lib/VNDB/Util/Misc.pm
@@ -13,11 +13,12 @@ our @EXPORT = qw|filFetchDB ieCheck|;
my %filfields = (
vn => [qw|length hasani tag_inc tag_exc taginc tagexc tagspoil lang olang plat ul_notblack ul_onwish ul_voted ul_onlist|],
release => [qw|type patch freeware doujin date_before date_after released minage lang olang resolution plat med voiced ani_story ani_ero|],
+ char => [qw|gender bloodt bust_min bust_max waist_min waist_max hip_min hip_max height_min height_max weight_min weight_max trait_inc trait_exc tagspoil role|],
);
# Arguments:
-# type ('vn' or 'release'),
+# type ('vn', 'release' or 'char'),
# filter overwrite (string or undef),
# when defined, these filters will be used instead of the preferences,
# must point to a variable, will be modified in-place with the actually used filters
@@ -30,7 +31,7 @@ sub filFetchDB {
my($self, $type, $overwrite, $pre, $post) = @_;
$pre = {} if !$pre;
$post = {} if !$post;
- my $dbfunc = $self->can($type eq 'vn' ? 'dbVNGet' : 'dbReleaseGet');
+ my $dbfunc = $self->can($type eq 'vn' ? 'dbVNGet' : $type eq 'release' ? 'dbReleaseGet' : 'dbCharGet');
my $prefname = 'filter_'.$type;
my $pref = $self->authPref($prefname);