Bug 30607

Summary: Enable 'Clear filter' option on DataTables Search for patron searches
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: PatronsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: normal    
Priority: P5 - low CC: gmcharlt, jonathan.druart, julian.maurice, kyle.m.hall, m.de.rooy, oleonard
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00
Bug Depends on: 30063    
Bug Blocks:    
Attachments: Bug 30607: Don't overload our default initComplete
Bug 30607: Don't overload our default initComplete
Bug 30607: Don't overload our default initComplete

Description Martin Renvoize 2022-04-25 13:03:16 UTC
The 'clear filter' button is permanently disabled on the patron search results page (member.pl). It shouldn't be.
Comment 1 Jonathan Druart 2022-04-27 11:55:17 UTC
Created attachment 134061 [details] [review]
Bug 30607: Don't overload our default initComplete

We want to keep the default initComplete call to add/remove the
'disabled' class on the 'Clear filters' link.

Test plan:
Search for patrons, add something to the general DT search and confirm
that the 'Clear filters' link can be clicked (ie. is not disabled) when
the input field is not empty.
Comment 2 Jonathan Druart 2022-04-27 11:55:39 UTC
Is there a more elegant way?
Comment 3 David Nind 2022-05-02 01:30:54 UTC
Created attachment 134450 [details] [review]
Bug 30607: Don't overload our default initComplete

We want to keep the default initComplete call to add/remove the
'disabled' class on the 'Clear filters' link.

Test plan:
Search for patrons, add something to the general DT search and confirm
that the 'Clear filters' link can be clicked (ie. is not disabled) when
the input field is not empty.

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Marcel de Rooy 2022-05-06 08:34:23 UTC
QAing
Comment 5 Marcel de Rooy 2022-05-06 08:40:10 UTC
(In reply to Jonathan Druart from comment #2)
> Is there a more elegant way?

Good question ;)
Comment 6 Marcel de Rooy 2022-05-06 08:41:23 UTC
Created attachment 134695 [details] [review]
Bug 30607: Don't overload our default initComplete

We want to keep the default initComplete call to add/remove the
'disabled' class on the 'Clear filters' link.

Test plan:
Search for patrons, add something to the general DT search and confirm
that the 'Clear filters' link can be clicked (ie. is not disabled) when
the input field is not empty.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Agree that it does not look very elegant.
Comment 7 Martin Renvoize 2022-05-06 09:15:34 UTC
I couldn't come up with a more elegant way.. been mulling it over for a few days and I came up empty.. so I fully agree with the PQA here :)
Comment 8 Fridolin Somers 2022-05-06 20:34:50 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄