Bug 31251 - "Clear" patron attribute link does not work
Summary: "Clear" patron attribute link does not work
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Lucas Gass
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-28 07:24 UTC by Jonathan Druart
Modified: 2023-06-08 22:26 UTC (History)
3 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:
22.11.00,22.05.06,21.11.12


Attachments
Bug 31251: Use jQuery val() to clear_entry (1.25 KB, patch)
2022-07-28 18:21 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 31251: Use jQuery val() to clear_entry (1.30 KB, patch)
2022-07-29 00:25 UTC, David Nind
Details | Diff | Splinter Review
Bug 31251: Use jQuery val() to clear_entry (1.36 KB, patch)
2022-07-30 18:30 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 Jonathan Druart 2022-07-28 07:24:50 UTC
On the patron edit view there is a "Clear" link to reset the value of an attribute.
It does no longer work, nothing happens and no error in the console.
Comment 1 Lucas Gass 2022-07-28 18:17:04 UTC
I think it is because we should use .val('') instead of .attr('value' , '').
Comment 2 Lucas Gass 2022-07-28 18:21:19 UTC
Created attachment 138223 [details] [review]
Bug 31251: Use jQuery val() to clear_entry

1. Add some patron attributes that are textarea and some that have an AV category so they are select dropdowns
2. Go to the patron form and add some values to the patron attributes
3. Use the "Clear" button to try and clear the values, doesnt work.
4. Apply patch
5. Try clearing values from patron attributes that are both select dropdowns and textarea. The "Clear" button should work.
Comment 3 David Nind 2022-07-29 00:25:28 UTC
Created attachment 138241 [details] [review]
Bug 31251: Use jQuery val() to clear_entry

1. Add some patron attributes that are textarea and some that have an AV category so they are select dropdowns
2. Go to the patron form and add some values to the patron attributes
3. Use the "Clear" button to try and clear the values, doesnt work.
4. Apply patch
5. Try clearing values from patron attributes that are both select dropdowns and textarea. The "Clear" button should work.

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Katrin Fischer 2022-07-30 18:30:11 UTC
Created attachment 138392 [details] [review]
Bug 31251: Use jQuery val() to clear_entry

1. Add some patron attributes that are textarea and some that have an AV category so they are select dropdowns
2. Go to the patron form and add some values to the patron attributes
3. Use the "Clear" button to try and clear the values, doesnt work.
4. Apply patch
5. Try clearing values from patron attributes that are both select dropdowns and textarea. The "Clear" button should work.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Tomás Cohen Arazi 2022-08-01 12:11:25 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 6 Lucas Gass 2022-09-29 15:09:44 UTC
Backported to 22.05.x for 22.05.06
Comment 7 Victor Grousset/tuxayo 2022-10-13 15:31:40 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.

Nothing to document it seems, marking resolved.
Comment 8 Arthur Suzuki 2022-10-22 22:09:17 UTC
Thanks!

Pushed to 21.11 for 21.11.12