There is a function in additional-contents.tt called Checkbox(). It checks to see if any checkboxes are checked. Can we just check the length with a selector and get rid of the function?
Created attachment 160727 [details] [review] Bug 35753: Remove Checkbox() function To test: 1. APPLY PATCH and clear browser cache. 2. Have multiple additional content items ( news/HTML customization/Pages ) 3. From one of the pages ( news/HTML customization/Pages ) click the 'Delete selected' button. Since no items are checked you should see the 'Please select content to delete' alert. 4. Check some items and click 'Delete selected' they should be correctly deleted. Note: There is no change in behavior from this patch.
Created attachment 160800 [details] [review] Bug 35753: Remove Checkbox() function To test: 1. APPLY PATCH and clear browser cache. 2. Have multiple additional content items ( news/HTML customization/Pages ) 3. From one of the pages ( news/HTML customization/Pages ) click the 'Delete selected' button. Since no items are checked you should see the 'Please select content to delete' alert. 4. Check some items and click 'Delete selected' they should be correctly deleted. Note: There is no change in behavior from this patch. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 161164 [details] [review] Bug 35753: Remove Checkbox() function To test: 1. APPLY PATCH and clear browser cache. 2. Have multiple additional content items ( news/HTML customization/Pages ) 3. From one of the pages ( news/HTML customization/Pages ) click the 'Delete selected' button. Since no items are checked you should see the 'Please select content to delete' alert. 4. Check some items and click 'Delete selected' they should be correctly deleted. Note: There is no change in behavior from this patch. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Much simpler, thanks :D Works, makes sense, QA script happy, code looks good, passing QA :)
Pushed for 24.05! Well done everyone, thank you!
Pushed to 23.11.x for 23.11.03