diff options
author | Yorhel <git@yorhel.nl> | 2020-07-19 15:53:28 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-07-19 15:53:30 +0200 |
commit | 52634340d6bad16e0ba922961a334354961bf9a0 (patch) | |
tree | 237dec5625979d8d9c0e10dd1299ce45796b8a71 /lib/VNDB/Handler/Producers.pm | |
parent | d7767fa0f907e7b2a0a3d879d9000fa137bd81db (diff) |
Producers::Edit: v2rw rewrite producer add/edit form
The copy-pasting here is ridiculous. But at the same time, that did
allow me to quickly rewrite the form in a single commit.
Here's hoping I didn't introduce too many copy-paste errors.
Diffstat (limited to 'lib/VNDB/Handler/Producers.pm')
-rw-r--r-- | lib/VNDB/Handler/Producers.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/VNDB/Handler/Producers.pm b/lib/VNDB/Handler/Producers.pm index d8b2cea1..6e70e512 100644 --- a/lib/VNDB/Handler/Producers.pm +++ b/lib/VNDB/Handler/Producers.pm @@ -9,8 +9,8 @@ use VNDB::Types; TUWF::register( - qr{p/add} => \&addform, - qr{p(?:([1-9]\d*)(?:\.([1-9]\d*))?/edit|/new)} + qr{old/p/add} => \&addform, + qr{old/p(?:([1-9]\d*)(?:\.([1-9]\d*))?/edit|/new)} => \&edit, qr{p/([a-z0]|all)} => \&list, qr{xml/producers\.xml} => \&pxml, @@ -68,7 +68,7 @@ sub addform { end 'div'; } - $self->htmlForm({ frm => $frm, action => '/p/add', continue => @$l ? 2 : 1 }, + $self->htmlForm({ frm => $frm, action => '/old/p/add', continue => @$l ? 2 : 1 }, vn_add => [ 'Add a new producer', [ input => name => 'Name (romaji)', short => 'name' ], [ input => name => 'Original name', short => 'original' ], @@ -151,7 +151,7 @@ sub edit { $self->htmlHeader(title => $title, noindex => 1); $self->htmlMainTabs('p', $p, 'edit') if $pid; $self->htmlEditMessage('p', $p, $title); - $self->htmlForm({ frm => $frm, action => $pid ? "/p$pid/edit" : '/p/new', editsum => 1 }, + $self->htmlForm({ frm => $frm, action => $pid ? "/old/p$pid/edit" : '/old/p/new', editsum => 1 }, 'pedit_geninfo' => [ 'General info', [ select => name => 'Type', short => 'type', options => [ map [ $_, $PRODUCER_TYPE{$_} ], keys %PRODUCER_TYPE ] ], |