From 46e6fb3c9d3bac85f4d3da30b6916f488a07975d Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Wed, 28 Oct 2020 15:23:05 +1300 Subject: [PATCH] Bug 14242: (follow-up) Remove well class, weird gap, fix clear form --- .../bootstrap/en/modules/opac-suggestions.tt | 22 ++++++++-------------- koha-tmpl/opac-tmpl/bootstrap/js/autofill.js | 5 +++++ 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt index 3d6d413615..2bac020eae 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt @@ -64,20 +64,14 @@ [% END %]
- [% IF Koha.Preference( 'OPACSuggestionAutoFill' ) %] -
-
  1. - - -
-
- [% END %] - [% IF Koha.Preference('OPACSuggestionAutoFill') %] -
- [% ELSE %] -
- [% END %] +
    + [% IF Koha.Preference( 'OPACSuggestionAutoFill' ) %] +
  1. + + +
  2. + [% END %]
  3. [% IF ( title_required ) %] @@ -115,7 +109,7 @@
  4. [% END %] - [% UNLESS ( isbn_hidden && Koha.Preference('OPACSuggestionAutoFill' )%] + [% UNLESS ( isbn_hidden or Koha.Preference('OPACSuggestionAutoFill') ) %]
  5. [% IF ( isbn_required ) %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/autofill.js b/koha-tmpl/opac-tmpl/bootstrap/js/autofill.js index 61bbcba97d..495de7054c 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/js/autofill.js +++ b/koha-tmpl/opac-tmpl/bootstrap/js/autofill.js @@ -46,6 +46,11 @@ } self.$fillbtn.click(function(){ + /* clear fields first */ + for(var key in self.fields) { + var field = self.fields[key]; + field.$target.trigger('autofill-undo'); + } /* only allow forced update once every second */ if(Date.now() - self.lastupdate > 1000) { self.$elm.trigger('change'); -- 2.11.0