Bug 24341 - Add support for more complex markup in OPAC confirmation dialogs
Summary: Add support for more complex markup in OPAC confirmation dialogs
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 21870
Blocks: 24336 24433
  Show dependency treegraph
 
Reported: 2020-01-03 17:39 UTC by Owen Leonard
Modified: 2020-11-30 21:44 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:
20.05.00


Attachments
Bug 24341: Allow for more complex markup in OPAC confirmation dialogs (3.52 KB, patch)
2020-01-03 17:49 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 24341: Allow for more complex markup in OPAC confirmation dialogs (3.57 KB, patch)
2020-01-15 22:29 UTC, Maryse Simard
Details | Diff | Splinter Review
Bug 24341: Allow for more complex markup in OPAC confirmation dialogs (3.63 KB, patch)
2020-01-19 21:44 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 2020-01-03 17:39:11 UTC
The confirmation dialogs made possible by Bug 21870 currently use jQuery's text() function to add content to the dialog's body. Using html() instead will allow us to show more than just plain text.
Comment 1 Owen Leonard 2020-01-03 17:49:21 UTC
Created attachment 96796 [details] [review]
Bug 24341: Allow for more complex markup in OPAC confirmation dialogs

This patch changes the globally-available confirmModal() function in the
OPAC so that it uses jQuery's html() function for adding information to
the confirmation modal's body. This will allow for more than just plain
text to be added.

This patch also removes some obsolete lines from the JavaScript in
opac-user.tt and renames some variable for clarity.

To test, apply the patch 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
Comment 2 Maryse Simard 2020-01-15 22:29:37 UTC
Created attachment 97420 [details] [review]
Bug 24341: Allow for more complex markup in OPAC confirmation dialogs

This patch changes the globally-available confirmModal() function in the
OPAC so that it uses jQuery's html() function for adding information to
the confirmation modal's body. This will allow for more than just plain
text to be added.

This patch also removes some obsolete lines from the JavaScript in
opac-user.tt and renames some variable for clarity.

To test, apply the patch 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: Maryse Simard <maryse.simard@inlibro.com>
Comment 3 Katrin Fischer 2020-01-15 22:38:42 UTC
Cancelling a hold in the OPAC doesn't ask for confirmation in my testing - can you pleas check?
Comment 4 Owen Leonard 2020-01-16 14:15:48 UTC
(In reply to Katrin Fischer from comment #3)
> Cancelling a hold in the OPAC doesn't ask for confirmation in my testing -
> can you pleas check?

This is true in master too. I've created Bug 24433
Comment 5 Katrin Fischer 2020-01-19 21:42:28 UTC
(In reply to Owen Leonard from comment #4)
> (In reply to Katrin Fischer from comment #3)
> > Cancelling a hold in the OPAC doesn't ask for confirmation in my testing -
> > can you pleas check?
> 
> This is true in master too. I've created Bug 24433

Thx Owen!
Comment 6 Katrin Fischer 2020-01-19 21:44:22 UTC
Created attachment 97591 [details] [review]
Bug 24341: Allow for more complex markup in OPAC confirmation dialogs

This patch changes the globally-available confirmModal() function in the
OPAC so that it uses jQuery's html() function for adding information to
the confirmation modal's body. This will allow for more than just plain
text to be added.

This patch also removes some obsolete lines from the JavaScript in
opac-user.tt and renames some variable for clarity.

To test, apply the patch 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: Maryse Simard <maryse.simard@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Martin Renvoize 2020-01-20 14:04:49 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 8 Joy Nelson 2020-01-31 23:35:33 UTC
Enhancement not backported to 19.11.x