@@ -, +, @@ suggestions field, or unfocus the field. automaticly. --- .../atomicupdate/bug_14242-autofill_syspref.sql | 1 + installer/data/mysql/sysprefs.sql | 1 + .../prog/en/modules/admin/preferences/opac.pref | 7 + .../bootstrap/en/includes/opac-bottom.inc | 4 + .../bootstrap/en/modules/opac-suggestions.tt | 44 +++-- koha-tmpl/opac-tmpl/bootstrap/js/autofill.js | 202 +++++++++++++++++++++ 6 files changed, 248 insertions(+), 11 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_14242-autofill_syspref.sql create mode 100644 koha-tmpl/opac-tmpl/bootstrap/js/autofill.js --- a/installer/data/mysql/atomicupdate/bug_14242-autofill_syspref.sql +++ a/installer/data/mysql/atomicupdate/bug_14242-autofill_syspref.sql @@ -0,0 +1, @@ +INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`,`type`) VALUES ('OPACAutoFill', '0', NULL, 'Automaticly fill forms with data from Google Books API','YesNo'); --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -340,6 +340,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('OAI-PMH:DeletedRecord','persistent','Koha\'s deletedbiblio table will never be deleted (persistent), might be deleted (transient), or will never have any data in it (no)','transient|persistent|no','Choice'), ('OAI-PMH:MaxCount','50',NULL,'OAI-PMH maximum number of records by answer to ListRecords and ListIdentifiers queries','Integer'), ('OPACAcquisitionDetails','0','','Show the acquisition details at the OPAC','YesNo'), +('OPACAutoFill','0',NULL,'Automaticly fill forms with data from Google Books API','YesNo'), ('OpacAddMastheadLibraryPulldown','0','','Adds a pulldown menu to select the library to search on the opac masthead.','YesNo'), ('OpacAdvSearchMoreOptions','pubdate,itemtype,language,subtype,sorting,location','Show search options for the expanded view (More options)','pubdate|itemtype|language|subtype|sorting|location','multiple'), ('OpacAdvSearchOptions','pubdate,itemtype,language,sorting,location','Show search options','pubdate|itemtype|language|subtype|sorting|location','multiple'), --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -530,6 +530,13 @@ OPAC: no: Don't display - a branch selection list for news items in the OPAC. - + - pref: OPACAutoFill + default: 0 + choices: + yes: Enable + no: Disable + - automatic form filling with data from Google Books API. + - - "Use the following as the OPAC ISBD template:" - pref: OPACISBD type: textarea --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc +++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc @@ -250,6 +250,10 @@ $.widget.bridge('uitooltip', $.ui.tooltip); [% END %] +[% IF ( Koha.Preference('OPACAutoFill') ) %] + +[% END %] + [% IF ( BakerTaylorEnabled ) %] [% Asset.js("js/bakertaylorimages.js") | $raw %]