@@ -, +, @@ 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(-) --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt +++ a/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 ) %] --- a/koha-tmpl/opac-tmpl/bootstrap/js/autofill.js +++ a/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'); --