From 1421db0e30115d46b7bd1cc993ff3c8a4023b72a Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Sun, 25 Nov 2012 20:30:57 -0500 Subject: [PATCH] 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 Signed-off-by: Chris Cormack --- koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt | 4 ++-- members/paycollect.pl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 d5102cc27c..d46ddeff0d 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 7dfb622393..3ba266170c 100755 --- a/members/paycollect.pl +++ b/members/paycollect.pl @@ -95,8 +95,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) { -- 2.39.5