Bug 29019: Unable to delete HTML customization
authorOwen Leonard <oleonard@myacpl.org>
Thu, 23 Sep 2021 21:14:52 +0000 (21:14 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 28 Sep 2021 13:12:45 +0000 (15:12 +0200)
commitf5fcd2a55eed9358f7a75c66a7eb6ef7d45b586f
tree4cc4bf062622d38caa99931a00fdb52f7ea65982
parentc08fd3e9872d16eb86abcb6035dd2d86b0047041
Bug 29019: Unable to delete HTML customization

This patch makes some corrections to additional contents to allow
content to be deleted. The wrong parameter was being passed to the
script. The script was also not handling multiple deletions correctly.

The patch also adds a "category" parameter to the delete operation so
that the page is redirected correctly.

The patch also changes some strings which referred to "news"
referencing operations which might be performed on news or on HTML
customizations, e.g.:

"Are you sure you want to delete the selected content?" instead of "Are
you sure you want to delete the selected news?"

To test, apply the patch and go to Tools -> News.

- Create multiple news items if necessary.
- Test the "Delete" button corresponding to a single news item:
  - Clicking the button should ask you to confirm.
  - Check that the wording of the message is correct.
  - After confirming the news item should be deleted.
  - Ideally, test on news items which are on the second page of the
    DataTable of news items.
- Test the process of deleting multiple news items at once:
  - Check the checkbox next to multiple items.
  - Click the "Delete selected" button at the bottom of the page.
  - Check that the wording of the confirmation message is correct.
  - After you confirm, the items should be deleted.
- Repeat these tests under Tools -> HTML customizations to confirm that
  redirects work correctly. After deleting an HTML customization you
  should be redirected back to the list of HTML customizations.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt
tools/additional-contents.pl