From: Owen Leonard Date: Mon, 26 Nov 2012 01:30:57 +0000 (-0500) Subject: Bug 9141 - Untranslatable strings on "pay an amount..." page X-Git-Tag: v3.12.00-alpha~230^2 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=f2c2be1c2026004a5398700443943a3b243a4bb4;p=srvgit Bug 9141 - Untranslatable strings on "pay an amount..." page Moving text of an error message from the script into the template. To test, submit an amount which is greater than the amount due. You should see an error message displayed correctly with a properly-formatted currency amount. Signed-off-by: Marc Veron Patch behaves as expected. Signed-off-by: Jonathan Druart Signed-off-by: Jared Camins-Esakov --- diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt index c558b0816a..5b3b2caae7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt @@ -84,9 +84,9 @@ function moneyFormat(textObj) {
-[% IF ( error ) %] +[% IF ( error_over ) %]
- [% error %] + You must pay a value less than or equal to [% total_due | format('%.2f') %].
[% END %] diff --git a/members/paycollect.pl b/members/paycollect.pl index 5a732a9c9e..d66702ec72 100755 --- a/members/paycollect.pl +++ b/members/paycollect.pl @@ -97,8 +97,8 @@ if ( $individual || $writeoff ) { if ( $total_paid and $total_paid ne '0.00' ) { if ( $total_paid < 0 or $total_paid > $total_due ) { $template->param( - error => sprintf( 'You must pay a value less than or equal to %f.2', - $total_due ) + error_over => 1, + total_due => $total_due ); } else { if ($individual) {