From ea3005fa49ffc4699e697d925e6828ed8f602101 Mon Sep 17 00:00:00 2001 From: Fridolyn SOMERS Date: Wed, 10 Apr 2013 12:37:54 +0200 Subject: [PATCH] Bug 10022 - Multiple tags moderation doesn't work on translated page When using a translated intranet, tags moderation using checkboxes and a submit button doesn't work. You get a message "Unknown Operation on x Term(s)" (translated of course). This patch corrects by using name="op-[operation]" instead of name="op" in each submit input. Test plan : - Create a new tag on a record - Go to tags moderation in Tools => You should see your tag in pending terms - Click on checkbox - Click on Approve or Reject submit button at the bottom of the table => Without patch the tag is still pending => With patch operation is well performed, tag is not pending - Test "Check lists" form - Test Approve and Reject buttons from "Actions" column Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Passes all tests and QA script. Signed-off-by: Jared Camins-Esakov Signed-off-by: Chris Cormack --- koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt | 6 +++--- tags/review.pl | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt index e4af5b0fb9..906f085254 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt @@ -249,8 +249,8 @@ td input,td input[type="submit"] { font-size: 85%; padding: 1px; } [% END %] [% IF ( tagloop ) %]
- - + +
[% END %] @@ -278,7 +278,7 @@ td input,td input[type="submit"] { font-size: 85%; padding: 1px; }
Enter a word or phrase to check against approved/rejected lists:
-
+
[% IF ( test_term ) %] [% IF ( verdict_ok ) %] diff --git a/tags/review.pl b/tags/review.pl index 7517f4167e..01e29d8ea2 100755 --- a/tags/review.pl +++ b/tags/review.pl @@ -89,7 +89,12 @@ my ($template, $borrowernumber, $cookie) = get_template_and_user({ }); my ($op, @errors, @tags); -$op = lc($input->param('op')) || 'none'; + +foreach (qw( approve reject test )) { + $op = $_ if ( $input->param("op-$_") ); +} +$op ||= 'none'; + @tags = $input->param('tags'); $borrowernumber == 0 and push @errors, {op_zero=>1}; -- 2.39.5