Bug 21870: Convert browser alerts to modals: OPAC user summary
authorOwen Leonard <oleonard@myacpl.org>
Wed, 27 Jun 2018 17:01:02 +0000 (17:01 +0000)
committerroot <root@f1ebe1bec408>
Tue, 26 Feb 2019 14:36:17 +0000 (14:36 +0000)
commitbee15e627f4d68c177fbe9f4e6774d679df6c346
tree9d08bc3e556e80582eb7096a8bc2aff978442bab
parente34a4b97ce4b48463fb6e640bfd6872c30fbe162
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 <jose-mario.monteiro-santos@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
koha-tmpl/opac-tmpl/bootstrap/js/global.js