Bugzilla – Attachment 150697 Details for
Bug 31132
Add button to clear the cataloguing authority plugin form
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31132: (follow-up) Reset dropdown values and style button
Bug-31132-follow-up-Reset-dropdown-values-and-styl.patch (text/plain), 3.81 KB, created by
Nicolas Giraud
on 2023-05-04 20:47:40 UTC
(
hide
)
Description:
Bug 31132: (follow-up) Reset dropdown values and style button
Filename:
MIME Type:
Creator:
Nicolas Giraud
Created:
2023-05-04 20:47:40 UTC
Size:
3.81 KB
patch
obsolete
>From 5f72ed9b3a1c5ca769248ca7427eec737f55c9f8 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Tue, 12 Jul 2022 16:48:44 +1200 >Subject: [PATCH] Bug 31132: (follow-up) Reset dropdown values and style button > >This follow-up patch resets the dropdown values of the form alongside >the text inputs. It styles the button to look like a link so it doesn't >distract the user and get 'accidentally' clicked when attempting to >submit. > >Test that the button looks and behaves as expected after submitting a >search. > >Signed-off-by: nicolas <nicolas@inlibro.com> >--- > .../prog/en/includes/auth-finder-search.inc | 2 +- > .../prog/en/modules/authorities/auth_finder.tt | 11 +++++++++++ > .../en/modules/authorities/searchresultlist-auth.tt | 9 +++++++++ > koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js | 10 +++++++++- > 4 files changed, 30 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc >index 36415537d5..eef1df7dcd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc >@@ -179,6 +179,6 @@ > </ol> > </fieldset> > [% END %] >- <fieldset class="action"> <input type="submit" value="Search" class="submit" id="search" /> <a id="clear-form" href="#" class="btn btn-link">Clear form</a> <a id="cancel" class="cancel close" href="#">Cancel</a> >+ <fieldset class="action"> <input type="submit" value="Search" class="submit" id="search" /> <input type="reset" id="clear-form" value="Clear form"> <a id="cancel" class="cancel close" href="#">Cancel</a> > </fieldset> > </form> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/auth_finder.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/auth_finder.tt >index 14d5b8db3c..b1ac1b538f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/auth_finder.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/auth_finder.tt >@@ -4,6 +4,17 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Cataloging authority plugin › Koha</title> > [% INCLUDE 'doc-head-close.inc' %] >+<style> >+#clear-form { >+ border:0; >+ background:none; >+ color:#004d99; >+ padding-left:1em; >+} >+#clear-form:hover { >+ color:#538200; >+} >+</style> > </head> > > <body id="auth_auth_finder" class="auth"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt >index 7931ce0345..91855bceda 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt >@@ -15,6 +15,15 @@ > .usefor li { > list-style-type: none; > } >+#clear-form { >+ border:0; >+ background:none; >+ color:#004d99; >+ padding-left:1em; >+} >+#clear-form:hover { >+ color:#538200; >+} > </style> > </head> > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js b/koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js >index 9144b979bf..d986723664 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js >@@ -94,7 +94,15 @@ $(document).ready(function(){ > minLength: 3, > }); > $("#clear-form").click(function(){ >- $(":input[type='text']").val(''); >+ setTimeout(function(){ >+ $(":input[type='text']").val(''); >+ $("#mainmainentry").val("contains"); >+ $("#mainentry").val("contains"); >+ $("#marclistheading").val("contains"); >+ $("#marclistanywhere").val("contains"); >+ $("#orderby").val("HeadingAsc"); >+ }, 50); >+ return true; > }); > }); > >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 31132
:
137595
|
137596
|
137601
|
138069
|
150696
|
150697
|
150814
|
150815