From bee15e627f4d68c177fbe9f4e6774d679df6c346 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 27 Jun 2018 17:01:02 +0000 Subject: [PATCH] Bug 21870: Convert browser alerts to modals: OPAC user summary This patch updates the user summary page in the OPAC so that JavaScript alerts are replaced with Bootstrap modals. This provides us the ability to more carefully control the content of confirmation dialogs and their control buttons. A global function for defining a modal confirmation boxes has been added, to which one can pass: - The modal title - Body - Text for submit and cancel buttons - A callback function to trigger on submit To test, apply the patch and clear your browser cache if necessary. - Log in to the OPAC as a user who has holds and article requests. - Test the following interactions, both the confirmation and cancel options for each: - Cancel a hold - Suspend all holds - Resume all holds - Cancel an article request Signed-off-by: Jose-Mario Monteiro-Santos Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens --- .../bootstrap/en/modules/opac-user.tt | 74 +++++++++++++++---- koha-tmpl/opac-tmpl/bootstrap/js/global.js | 36 +++++++++ 2 files changed, 96 insertions(+), 14 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt index 7af3a0f8c8..1256bf62b3 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -762,10 +762,10 @@ [% END # / IF SuspendHoldsOpac %] [% IF ( RESERVE.is_cancelable_from_opac ) %] -
+ -
+ [% END %] @@ -775,8 +775,8 @@ [% IF SuspendHoldsOpac %]
-
- + + [% IF AutoResumeSuspendedHolds %] @@ -788,8 +788,8 @@

- - + +
@@ -885,7 +885,10 @@ Cancel: - Cancel +
+ + +
[% END %] @@ -917,17 +920,10 @@ [% END %] [% INCLUDE 'opac-bottom.inc' %] - - [% BLOCK jsinclude %] [% INCLUDE 'calendar.inc' %] [% INCLUDE 'datatables.inc' %]