Bug 24341

Summary: Add support for more complex markup in OPAC confirmation dialogs
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: joy, katrin.fischer, martin.renvoize, maryse.simard, testopia
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Who signed the patch off: Text to go in the release notes:
Version(s) released in:
20.05.00
Bug Depends on: 21870    
Bug Blocks: 24336, 24433    
Attachments: Bug 24341: Allow for more complex markup in OPAC confirmation dialogs
Bug 24341: Allow for more complex markup in OPAC confirmation dialogs
Bug 24341: Allow for more complex markup in OPAC confirmation dialogs

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