Bug 7741

Summary: Clear search terms in Z3950 search page
Product: Koha Reporter: Savitra Sirohi <savitra.sirohi>
Component: CatalogingAssignee: Tom Misilo <tmisilo>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: enhancement    
Priority: P5 - low CC: chris, gmcharlt, jonathan.druart, melia, nengard, tmisilo, tomascohen, veron
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 13218    
Bug Blocks:    
Attachments: Clear z39.50 Search Fields
Z39.50 Clear Search Fields Patch
[Signed-off] Added Clearing Capability to the Z39.50 Search fields
Bug 7741 [Follow-up] Clear search terms in Z3950 search page
Bug 7741: Added Clearing Capability to the Z39.50 Search fields
Bug 7741 [Follow-up] Clear search terms in Z3950 search page
Bug 7741: Added Clearing Capability to the Z39.50 Search fields
Bug 7741 [Follow-up] Clear search terms in Z3950 search page

Description Savitra Sirohi 2012-03-19 14:31:51 UTC
In Z39.50 search screen, create a button to blank out information from the bib record [clear the search fields].
Comment 1 Savitra Sirohi 2012-03-19 14:33:59 UTC
In cataloguing/z3950_search.pl, add a button "Clear" to clear any text entered in the search fields.
Comment 2 Galen Charlton 2013-08-12 15:54:59 UTC
Is there a patch forthcoming?
Comment 3 Tom Misilo 2014-12-03 01:19:31 UTC Comment hidden (obsolete)
Comment 4 Tom Misilo 2014-12-03 01:19:59 UTC
I don't have a running instance of Koha yet, but I did test this in Firebug and it worked there.
Comment 5 Marc Véron 2014-12-05 10:33:52 UTC
The patch displays "Clear Search Form" on Authorities search only:
/koha/cataloguing/z3950_auth_search.pl
(Home:Authorities:New from Z39.50)

Is it possible to have it on other Z39.50/SRU pages as well?

/koha/cataloguing/z3950_search.pl
(Home:Cataloging:New from Z39.50/SRU)

and /koha/acqui/z3950_search.pl
(Home:Acquisitions:[Bookshop]:[Basket]:Order from external source)

Marc
Comment 6 Tom Misilo 2014-12-05 13:53:13 UTC Comment hidden (obsolete)
Comment 7 Marc Véron 2014-12-05 14:13:29 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2014-12-08 16:46:38 UTC
QA comment:

Please define css styles in the css file and replace tabulation with 4 spaces.

Marked as Failed QA.
Comment 9 Katrin Fischer 2014-12-08 21:10:13 UTC
Hi Tom, I think this will be a useful enhancement and welcome! Let us know if you need any help with reworking the patch. You can set the status back to 'needs sign-off' when the 2 things Jonathan noticed have been fixed.
Comment 10 Tom Misilo 2014-12-09 12:12:39 UTC
I think I will need help with the CSS, where exactly do you want me to add the CSS styles? All I did was copy existing tags that were already on the page. 

If I move my stuff to the CSS file, would you want me touching other code on the page not relevant to what I was trying to do in my patch? Just want to make sure. Thanks
Comment 11 Owen Leonard 2014-12-09 18:11:37 UTC Comment hidden (obsolete)
Comment 12 Jonathan Druart 2014-12-10 08:56:09 UTC Comment hidden (obsolete)
Comment 13 Jonathan Druart 2014-12-10 08:56:12 UTC Comment hidden (obsolete)
Comment 14 Jonathan Druart 2014-12-10 08:58:06 UTC
Qaed with bug 13218.
Comment 15 Tomás Cohen Arazi (tcohen) 2014-12-19 18:16:54 UTC
My followup for bug 13218 broke this one. Could you please rebase?
Comment 16 Tom Misilo 2015-02-16 14:24:39 UTC
(In reply to Tomás Cohen Arazi from comment #15)
> My followup for bug 13218 broke this one. Could you please rebase?

Tomás what would I need to do in order to rebase this? Thanks!
Comment 17 Jonathan Druart 2015-02-16 15:07:19 UTC
Created attachment 35941 [details] [review]
Bug 7741: Added Clearing Capability to the Z39.50 Search fields

Tested in:
/koha/cataloguing/z3950_auth_search.pl
(Home:Authorities:New from Z39.50)

/koha/cataloguing/z3950_search.pl
(Home:Cataloging:New from Z39.50/SRU)

/koha/acqui/z3950_search.pl
(Home:Acquisitions:[Bookshop]:[Basket]:Order from external source)

All three forms can now be cleared.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 18 Jonathan Druart 2015-02-16 15:07:26 UTC
Created attachment 35942 [details] [review]
Bug 7741 [Follow-up] Clear search terms in Z3950 search page

This patch makes a follow-up change and takes as its basis a dependency
on Bug 13218 - usability enhancement for z39.50 search. If we have a
one-column search form it's possible to put the "Clear search form" link
at the bottom of the form rather than in the header, logically
associating it with the grouping of form fields which will be affected.

Doing so also allows us to eliminate all the custom styling which was an
issue for QA.

Other changes made by this patch: Fixing the indentation
error, correcting the case of the link text ("Clear search form" instead
of "Clear Search Form"), and adding "preventDefault()" to the click
handler so that clicking the link doesn't scroll the user back to the
top of the page.

To test, apply the previous patch and this one on top of Bug 13218.
Repeat the test plan.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 19 Jonathan Druart 2015-02-16 15:08:35 UTC
Apply cleanly here, resubmitting...
Comment 20 Tom Misilo 2015-02-16 15:10:50 UTC
Thank you Jonathan.
Comment 21 Tomás Cohen Arazi (tcohen) 2015-02-17 02:46:57 UTC
Patches pushed to master.

Thanks Thomas! And congratulations for your patch!