In Z39.50 search screen, create a button to blank out information from the bib record [clear the search fields].
In cataloguing/z3950_search.pl, add a button "Clear" to clear any text entered in the search fields.
Is there a patch forthcoming?
Created attachment 34079 [details] [review] Clear z39.50 Search Fields
I don't have a running instance of Koha yet, but I did test this in Firebug and it worked there.
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
Created attachment 34139 [details] [review] Z39.50 Clear Search Fields Patch
Created attachment 34141 [details] [review] [Signed-off] Added Clearing Capability to the Z39.50 Search fields http://bugs.koha-community.org/show_bug.cgi?id=7741 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>
QA comment: Please define css styles in the css file and replace tabulation with 4 spaces. Marked as Failed QA.
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.
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
Created attachment 34248 [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.
Created attachment 34268 [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>
Created attachment 34269 [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>
Qaed with bug 13218.
My followup for bug 13218 broke this one. Could you please rebase?
(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!
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>
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>
Apply cleanly here, resubmitting...
Thank you Jonathan.
Patches pushed to master. Thanks Thomas! And congratulations for your patch!