Bugzilla – Attachment 26797 Details for
Bug 11993
Untranslatable confirm popup in request.tt
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11993 - Untranslatable confirm popup in request.tt
Bug-11993---Untranslatable-confirm-popup-in-reques.patch (text/plain), 4.57 KB, created by
Jonathan Druart
on 2014-04-03 14:59:28 UTC
(
hide
)
Description:
Bug 11993 - Untranslatable confirm popup in request.tt
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-04-03 14:59:28 UTC
Size:
4.57 KB
patch
obsolete
>From f45e440c9b39d1025817b45bc911fc7fd25afb78 Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >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) 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 <oleonard@myacpl.org> >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js | 6 +++++- > koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 3 ++- > 2 files changed, 7 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..aba7e8a 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,8 @@ 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 1f6bd82..b4512ab 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' %] > <script type="text/javascript"> > // <![CDATA[ >+var MSG_CONFIRM_DELETE_HOLD = _("Are you sure you want to cancel this hold?"); > var patron_homebranch = "[% borrower_branchname |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') %]"; > var override_items = {[% FOREACH bibitemloo IN bibitemloop %][% FOREACH itemloo IN bibitemloo.itemloop %][% IF ( itemloo.override ) %] > [% itemloo.itemnumber %]: { >@@ -462,7 +463,7 @@ function checkMultiHold() { > [% IF ( itemloo.waitingdate ) %]Waiting[% ELSE %]On hold[% END %] > [% IF ( itemloo.canreservefromotherbranches ) %]for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% itemloo.ReservedForBorrowernumber %]">[% itemloo.ReservedForFirstname %] [% itemloo.ReservedForSurname %]</a>[% END %] [% IF ( itemloo.waitingdate ) %]at[% ELSE %]expected at[% END %] [% itemloo.ExpectedAtLibrary %] > since >- [% IF ( itemloo.waitingdate ) %][% itemloo.waitingdate | $KohaDates %][% ELSE %][% IF ( itemloo.reservedate ) %][% itemloo.reservedate %][% END %][% END %]. <a class="info" href="modrequest.pl?CancelBiblioNumber=[% itemloo.biblionumber %]&CancelBorrowerNumber=[% itemloo.ReservedForBorrowernumber %]&CancelItemnumber=[% itemloo.itemnumber %]" onclick="if (window.confirm('Are you sure you want to delete this hold?')) {return true;} else {return false;}">Cancel hold</a> >+ [% IF ( itemloo.waitingdate ) %][% itemloo.waitingdate | $KohaDates %][% ELSE %][% IF ( itemloo.reservedate ) %][% itemloo.reservedate %][% END %][% END %]. <a class="info" href="modrequest.pl?CancelBiblioNumber=[% itemloo.biblionumber %]&CancelBorrowerNumber=[% itemloo.ReservedForBorrowernumber %]&CancelItemnumber=[% itemloo.itemnumber %]" onclick="return confirmDelete(MSG_CONFIRM_DELETE_HOLD);">Cancel hold</a> > > [% END %] > [% ELSE %] >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11993
:
26620
|
26795
| 26797