Bug 25281 - Use modal confirmation when deleting a list in the OPAC
Summary: Use modal confirmation when deleting a list in the OPAC
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 25280
Blocks: 18117
  Show dependency treegraph
 
Reported: 2020-04-24 16:15 UTC by Owen Leonard
Modified: 2020-05-08 22:30 UTC (History)
2 users (show)

See Also:
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


Attachments
Bug 25281: Use modal confirmation when deleting a list in the OPAC (8.72 KB, patch)
2020-04-24 19:40 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 25281: Use modal confirmation when deleting a list in the OPAC (8.82 KB, patch)
2020-04-24 21:56 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 25281: Use modal confirmation when deleting a list in the OPAC (8.88 KB, patch)
2020-04-24 22:54 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 25281: Use modal confirmation when deleting a list in the OPAC (8.93 KB, patch)
2020-04-25 22: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-04-24 16:15:13 UTC
Bug 21870 added a framework for using a Bootstrap modal to replace generic JavaScript confirm dialogs. I would like to implement this in the OPAC lists interface for the process of deleting a list.

This will allow us to include more information in the confirmation: List title, number of titles on the list, and whether it is shared.
Comment 1 Owen Leonard 2020-04-24 19:40:04 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2020-04-24 21:56:02 UTC
Created attachment 103708 [details] [review]
Bug 25281: Use modal confirmation when deleting a list in the OPAC

This patch modifies the process of deleting a list in the OPAC so that
the deletion confirmation alert is replaced with a Bootstrap modal.

In the process, I moved the repeated deletion form markup into a block

To test, apply the patch and log in to the OPAC as a user who has
multiple lists, including some which have been shared with other users.

Go to the list of your lists and click the "Delete" link next to any of
your lists. It should trigger a confirmation modal:

 - The modal should show the title of the list you're deleting.
 - If the list has titles on it, it show how many.
 - If the list has been shared with someone it should say so.

Next, view a list which is not empty.

 - Test the "Delete list" link in the toolbar.
 - You should see the same information in the confirmation message as in
   the previous step.

Do the same with a list which is empty.
Comment 3 Lucas Gass 2020-04-24 22:54:58 UTC
Created attachment 103709 [details] [review]
Bug 25281: Use modal confirmation when deleting a list in the OPAC

This patch modifies the process of deleting a list in the OPAC so that
the deletion confirmation alert is replaced with a Bootstrap modal.

In the process, I moved the repeated deletion form markup into a block

To test, apply the patch and log in to the OPAC as a user who has
multiple lists, including some which have been shared with other users.

Go to the list of your lists and click the "Delete" link next to any of
your lists. It should trigger a confirmation modal:

 - The modal should show the title of the list you're deleting.
 - If the list has titles on it, it show how many.
 - If the list has been shared with someone it should say so.

Next, view a list which is not empty.

 - Test the "Delete list" link in the toolbar.
 - You should see the same information in the confirmation message as in
   the previous step.

Do the same with a list which is empty.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 4 Katrin Fischer 2020-04-25 22:44:42 UTC
Created attachment 103715 [details] [review]
Bug 25281: Use modal confirmation when deleting a list in the OPAC

This patch modifies the process of deleting a list in the OPAC so that
the deletion confirmation alert is replaced with a Bootstrap modal.

In the process, I moved the repeated deletion form markup into a block

To test, apply the patch and log in to the OPAC as a user who has
multiple lists, including some which have been shared with other users.

Go to the list of your lists and click the "Delete" link next to any of
your lists. It should trigger a confirmation modal:

 - The modal should show the title of the list you're deleting.
 - If the list has titles on it, it show how many.
 - If the list has been shared with someone it should say so.

Next, view a list which is not empty.

 - Test the "Delete list" link in the toolbar.
 - You should see the same information in the confirmation message as in
   the previous step.

Do the same with a list which is empty.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Martin Renvoize 2020-04-29 16:36:29 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 6 Joy Nelson 2020-05-08 22:30:01 UTC
not backported to 19.11