View | Details | Raw Unified | Return to bug 14242
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_14242-autofill_syspref.sql (-1 / +1 lines)
Line 1 Link Here
1
INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`,`type`) VALUES ('OPACAutoFill', '0', NULL, 'Automaticly fill forms with data from Google Books API','YesNo');
1
INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`,`type`) VALUES ('OPACSuggestionAutoFill', '0', NULL, 'Automaticly fill forms with data from Google Books API','YesNo');
(-)a/installer/data/mysql/sysprefs.sql (-1 / +1 lines)
Lines 360-366 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
360
('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'),
360
('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'),
361
('OAI-PMH:MaxCount','50',NULL,'OAI-PMH maximum number of records by answer to ListRecords and ListIdentifiers queries','Integer'),
361
('OAI-PMH:MaxCount','50',NULL,'OAI-PMH maximum number of records by answer to ListRecords and ListIdentifiers queries','Integer'),
362
('OPACAcquisitionDetails','0','','Show the acquisition details at the OPAC','YesNo'),
362
('OPACAcquisitionDetails','0','','Show the acquisition details at the OPAC','YesNo'),
363
('OPACAutoFill','0',NULL,'Automaticly fill forms with data from Google Books API','YesNo'),
363
('OPACSuggestionAutoFill','0',NULL,'Automaticly fill forms with data from Google Books API','YesNo'),
364
('OpacAddMastheadLibraryPulldown','0','','Adds a pulldown menu to select the library to search on the opac masthead.','YesNo'),
364
('OpacAddMastheadLibraryPulldown','0','','Adds a pulldown menu to select the library to search on the opac masthead.','YesNo'),
365
('OpacAdvSearchMoreOptions','pubdate,itemtype,language,subtype,sorting,location','Show search options for the expanded view (More options)','pubdate|itemtype|language|subtype|sorting|location','multiple'),
365
('OpacAdvSearchMoreOptions','pubdate,itemtype,language,subtype,sorting,location','Show search options for the expanded view (More options)','pubdate|itemtype|language|subtype|sorting|location','multiple'),
366
('OpacAdvSearchOptions','pubdate,itemtype,language,sorting,location','Show search options','pubdate|itemtype|language|subtype|sorting|location','multiple'),
366
('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 (-1 / +1 lines)
Lines 526-532 OPAC: Link Here
526
                  no: Don't display
526
                  no: Don't display
527
            - a branch selection list for news items in the OPAC.
527
            - a branch selection list for news items in the OPAC.
528
        -
528
        -
529
            - pref: OPACAutoFill
529
            - pref: OPACSuggestionAutoFill
530
              default: 0
530
              default: 0
531
              choices:
531
              choices:
532
                  yes: Enable
532
                  yes: Enable
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc (-1 / +1 lines)
Lines 244-250 $.widget.bridge('uitooltip', $.ui.tooltip); Link Here
244
    </script>
244
    </script>
245
[% END %]
245
[% END %]
246
246
247
[% IF ( Koha.Preference('OPACAutoFill') ) %]
247
[% IF ( Koha.Preference('OPACSuggestionAutoFill') ) %]
248
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/autofill.js"></script>
248
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/autofill.js"></script>
249
[% END %]
249
[% END %]
250
250
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt (-5 / +4 lines)
Lines 55-66 Link Here
55
                            [% END %]
55
                            [% END %]
56
56
57
                            <form action="/cgi-bin/koha/opac-suggestions.pl" method="post" id="add_suggestion_form">
57
                            <form action="/cgi-bin/koha/opac-suggestions.pl" method="post" id="add_suggestion_form">
58
                                [% IF Koha.Preference( 'OPACAutoFill' ) %]
58
                                [% IF Koha.Preference( 'OPACSuggestionAutoFill' ) %]
59
                                <fieldset class="rows well" style="margin-bottom: 3em;padding-top: 5px;">
59
                                <fieldset class="rows well" style="margin-bottom: 3em;padding-top: 5px;">
60
                                    <label for="isbn">Standard number (ISBN, ISSN or other):</label><input type="text" id="isbn" name="isbn"  maxlength="80" />
60
                                    <label for="isbn">Standard number (ISBN, ISSN or other):</label><input type="text" id="isbn" name="isbn"  maxlength="80" />
61
                                </fieldset>
61
                                </fieldset>
62
                                [% END %]
62
                                [% END %]
63
                                    <fieldset class="rows [% IF Koha.Preference( 'OPACAutoFill' ) %]well[% END %]">
63
                                    <fieldset class="rows [% IF Koha.Preference( 'OPACSuggestionAutoFill' ) %]well[% END %]">
64
                                    <ol>
64
                                    <ol>
65
                                        <li>
65
                                        <li>
66
                                            [% IF ( title_required ) %]
66
                                            [% IF ( title_required ) %]
Lines 94-100 Link Here
94
                                                [% END %]
94
                                                [% END %]
95
                                            </div>
95
                                            </div>
96
                                        </li>
96
                                        </li>
97
                                        [% UNLESS Koha.Preference( 'OPACAutoFill' ) %]
97
                                        [% UNLESS Koha.Preference( 'OPACSuggestionAutoFill' ) %]
98
                                            <li>
98
                                            <li>
99
                                                [% IF ( isbn_required ) %]
99
                                                [% IF ( isbn_required ) %]
100
                                                    <label for="isbn" class="required">Standard number (ISBN, ISSN or other):</label>
100
                                                    <label for="isbn" class="required">Standard number (ISBN, ISSN or other):</label>
Lines 456-462 Link Here
456
        }
456
        }
457
    [% END %]
457
    [% END %]
458
458
459
    [% IF Koha.Preference( 'OPACAutoFill' ) %]
459
    [% IF Koha.Preference( 'OPACSuggestionAutoFill' ) %]
460
    $(function() {
460
    $(function() {
461
        $('#isbn').autofill({
461
        $('#isbn').autofill({
462
            'volumeInfo.title': {target: 'title', effect: 'flash'},
462
            'volumeInfo.title': {target: 'title', effect: 'flash'},
463
- 

Return to bug 14242