From ff8b9039c9964a805345fb2516f6ccb42c3a3719 Mon Sep 17 00:00:00 2001 From: Bernardo Gonzalez Kriegel Date: Thu, 27 Mar 2014 00:32:33 -0300 Subject: [PATCH] Bug 11993 - 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 funcion, 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) I'm at lost, don't know how to produce the situation in which this message appear, perhaps when staff personel tries to cancel a hold in transit If you know how, please tell me and I will resubmit with a better test plan. 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 --- koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js | 7 ++++++- .../prog/en/modules/reserve/request.tt | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) 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 c97007f..d7986ca 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js @@ -91,4 +91,9 @@ function toUC(f) { var x=f.value.toUpperCase(); f.value=x; return true; -} \ No newline at end of file +} + +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 93c005a..6b9bdf9 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' %]