From cfe5bc1f087994317dfc53a0cb47fe1968237f45 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 --- .../opac-tmpl/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 bf5738e..0e049fe 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' %]