Bug 39477 - Highlighting the item search field that is being deleted doesn't work
Summary: Highlighting the item search field that is being deleted doesn't work
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-27 22:15 UTC by Phil Ringnalda
Modified: 2025-03-27 22:15 UTC (History)
0 users

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Ringnalda 2025-03-27 22:15:18 UTC
Steps to reproduce:
1. Administration - Item search fields
2. New field - fill out any values for the required fields and submit
3. Click the delete button for the new field

Expected result: koha-tmpl/intranet-tmpl/prog/js/item_search_fields.js#L13 thinks it will add the class "highlighted-row" to the table row, and that doing so will show that row with a yellow background while the alert asks if you are sure

Actual result: since CSRF protection added a form around the button, the row is three parent()s up, not two, but even after adding the third parent(), the page doesn't reflect the added class until after the confirm() alert is dismissed, which is too late.