Bug 21870 - Convert browser alerts to modals: OPAC user summary
Summary: Convert browser alerts to modals: OPAC user summary
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
: 20278 (view as bug list)
Depends on:
Blocks: 18117 24341
  Show dependency treegraph
 
Reported: 2018-11-20 19:35 UTC by Owen Leonard
Modified: 2020-11-30 21:45 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 21870: Convert browser alerts to modals: OPAC user summary (11.75 KB, patch)
2018-11-20 20:00 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 21870: Convert browser alerts to modals: OPAC user summary (11.84 KB, patch)
2019-02-15 21:16 UTC, José-Mario Monteiro-Santos
Details | Diff | Splinter Review
Bug 21870: Convert browser alerts to modals: OPAC user summary (11.91 KB, patch)
2019-02-17 10:55 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2018-11-20 19:35:07 UTC
I propose to update the user summary page in the OPAC so that JavaScript alerts are replaced by modal confirmation dialogs.
Comment 1 Owen Leonard 2018-11-20 20:00:31 UTC Comment hidden (obsolete)
Comment 2 José-Mario Monteiro-Santos 2019-02-15 21:16:16 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2019-02-17 10:50:35 UTC
Just a note for now:

The space in front of strings seems to get lost in translations. Example:

<i class="fa fa-play"></i> Resume all suspended holds</button>
http://translate.koha-community.org/sv/translate/#search=Resume%20all%20suspended%20holds&sfields=source,target&soptions=exact,case&unit=8394611&offset=0

Strings here are the same before and after, so not a reason to fail, but something we might want to keep in mind.
Comment 4 Katrin Fischer 2019-02-17 10:55:20 UTC
Created attachment 85218 [details] [review]
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>
Comment 5 Nick Clemens (kidclamp) 2019-02-26 14:40:36 UTC
Awesome work all!

Pushed to master for 19.05
Comment 6 Martin Renvoize (ashimema) 2019-03-01 11:17:19 UTC
Enhancement will not be backported to 18.11.x series.
Comment 7 Owen Leonard 2020-01-10 12:39:24 UTC
*** Bug 20278 has been marked as a duplicate of this bug. ***