From d8eeb697c873b1ba9366bbce275a14d004931f40 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 10 Sep 2012 08:34:33 -0400 Subject: [PATCH] Bug 7598: make strings in acquisitions JavaScript translatable English strings in acq.js cannot be processed by the translation script. This patch moves the strings to the templates to be set as JS variables for use by the script. To test: - On the uncertain prices page, enter an invalid price and click save. You should see a JavaScript alert pointing this out. - When adding a fund to an existing budget, enter an amount which exceeds the amount in the parent budget. You should see a JavaScript alert pointing this out. There is a similar function which has been corrected, checkBudgetParent(), but I don't know how to trigger it for testing. The closebasketgroup function has been updated but as far as I can tell it's not actually in use. Signed-off-by: Srdjan Signed-off-by: Jonathan Druart Signed-off-by: Galen Charlton (cherry picked from commit f69e13665da007a6ab28e4c1d5a7d1a50f3ac3ac) Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/intranet-tmpl/prog/en/js/acq.js | 20 +++++++++---------- .../prog/en/modules/acqui/basketgroup.tt | 6 ++++++ .../prog/en/modules/acqui/uncertainprice.tt | 1 + .../prog/en/modules/admin/aqbudgets.tt | 7 +++++++ 4 files changed, 24 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js b/koha-tmpl/intranet-tmpl/prog/en/js/acq.js index 067cd08642..0294805655 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/acq.js @@ -4,7 +4,7 @@ function uncheckbox(form, field) { var price = new Number(form.elements['price' + field].value); var tmpprice = ""; - var errmsg = _("ERROR: Price is not a valid number, please check the price and try again!") + var errmsg = MSG_INVALIDPRICE; if (isNaN(price)) { alert(errmsg); for(var i=0; i diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt index 7df04f3cfe..44106aeada 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt @@ -1,6 +1,13 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Administration › Funds[% IF ( add_form ) %] › [% IF ( budget_id ) %]Modify fund[% IF ( budget_name ) %] '[% budget_name %]'[% END %][% ELSE %]Add fund [% END %][% END %] [% INCLUDE 'doc-head-close.inc' %] + + [% IF ( add_form ) %] -- 2.39.5