From 80c57ea38d2ce5864be4d180e1657005ea977159 Mon Sep 17 00:00:00 2001 From: Bernardo Gonzalez Kriegel Date: Thu, 27 Mar 2014 00:32:33 -0300 Subject: [PATCH] Bug 11993: fix untranslatable confirm popup in request.tt This patch makes confirm popup text translatable. It implements a similar function as used on OPAC deleteConfirm() and a JS var message. This function, or variants, can also be found on other files on intranet, I think that the only valid places are staff-global.js and help-top.inc Redefinitions of this function: prog/en/modules/serials/subscription-frequencies.tt:6 prog/en/modules/tools/marc_modification_templates.tt:158 prog/en/modules/virtualshelves/shelves.tt:92 Last case is a little different To test: 1) Confirm that the "cancel hold" link correctly prompts for confirmation: a) Place an item-level hold on a title. b) Check in the item and confirm the hold. c) Return to the place hold screen for that title and submit another patron to place a hold for. d) On the place hold screen for that patron, look at the table of items. There should be a "cancel hold" link next to the item for which the hold was confirmed in step (b). e) Click "cancel hold." You should see a confirmation message. Cancelling this dialog should cancel the operation. Confirming it should cancel the hold. 2) Check the string is not present on staff PO file 3) Apply the patch 4) Update translation files (cd misc/translator; perl translate update xx-YY) 5) Verify the string is now present Signed-off-by: Owen Leonard Signed-off-by: Jonathan Druart Signed-off-by: Galen Charlton (cherry picked from commit 5da480b61b689c7497d386fdd0b9bd30f260d2db) Conflicts: koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js --- koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js | 4 ++++ koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js index 4076072aee..95aaa89e2c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js @@ -92,3 +92,7 @@ function toUC(f) { f.value=x; return true; } + +function confirmDelete(message) { + return (confirm(message) ? true : false); +} diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index 1f6bd8282a..b4512ab36b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -9,6 +9,7 @@ [% INCLUDE 'calendar.inc' %]