Bug 35753 - Checkbox() function in additional-contents not necessary
Summary: Checkbox() function in additional-contents not necessary
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Lucas Gass
QA Contact: Testopia
URL:
Keywords:
Depends on: 35752
Blocks:
  Show dependency treegraph
 
Reported: 2024-01-09 21:56 UTC by Lucas Gass
Modified: 2024-02-01 15:10 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.03


Attachments
Bug 35753: Remove Checkbox() function (2.29 KB, patch)
2024-01-09 22:01 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 35753: Remove Checkbox() function (2.36 KB, patch)
2024-01-11 08:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 35753: Remove Checkbox() function (2.42 KB, patch)
2024-01-18 23:54 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass 2024-01-09 21:56:26 UTC
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?
Comment 1 Lucas Gass 2024-01-09 22:01:16 UTC
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.
Comment 2 Jonathan Druart 2024-01-11 08:01:54 UTC
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>
Comment 3 Victor Grousset/tuxayo 2024-01-18 23:54:36 UTC
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>
Comment 4 Victor Grousset/tuxayo 2024-01-18 23:56:08 UTC
Much simpler, thanks :D

Works, makes sense, QA script happy, code looks good, passing QA :)
Comment 5 Katrin Fischer 2024-01-29 11:29:14 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 6 Fridolin Somers 2024-02-01 15:10:45 UTC
Pushed to 23.11.x for 23.11.03