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 340-346 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
340
('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'),
340
('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'),
341
('OAI-PMH:MaxCount','50',NULL,'OAI-PMH maximum number of records by answer to ListRecords and ListIdentifiers queries','Integer'),
341
('OAI-PMH:MaxCount','50',NULL,'OAI-PMH maximum number of records by answer to ListRecords and ListIdentifiers queries','Integer'),
342
('OPACAcquisitionDetails','0','','Show the acquisition details at the OPAC','YesNo'),
342
('OPACAcquisitionDetails','0','','Show the acquisition details at the OPAC','YesNo'),
343
('OPACAutoFill','0',NULL,'Automaticly fill forms with data from Google Books API','YesNo'),
343
('OPACSuggestionAutoFill','0',NULL,'Automaticly fill forms with data from Google Books API','YesNo'),
344
('OpacAddMastheadLibraryPulldown','0','','Adds a pulldown menu to select the library to search on the opac masthead.','YesNo'),
344
('OpacAddMastheadLibraryPulldown','0','','Adds a pulldown menu to select the library to search on the opac masthead.','YesNo'),
345
('OpacAdvSearchMoreOptions','pubdate,itemtype,language,subtype,sorting,location','Show search options for the expanded view (More options)','pubdate|itemtype|language|subtype|sorting|location','multiple'),
345
('OpacAdvSearchMoreOptions','pubdate,itemtype,language,subtype,sorting,location','Show search options for the expanded view (More options)','pubdate|itemtype|language|subtype|sorting|location','multiple'),
346
('OpacAdvSearchOptions','pubdate,itemtype,language,sorting,location','Show search options','pubdate|itemtype|language|subtype|sorting|location','multiple'),
346
('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 530-536 OPAC: Link Here
530
                  no: Don't display
530
                  no: Don't display
531
            - a branch selection list for news items in the OPAC.
531
            - a branch selection list for news items in the OPAC.
532
        -
532
        -
533
            - pref: OPACAutoFill
533
            - pref: OPACSuggestionAutoFill
534
              default: 0
534
              default: 0
535
              choices:
535
              choices:
536
                  yes: Enable
536
                  yes: Enable
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc (-1 / +1 lines)
Lines 250-256 $.widget.bridge('uitooltip', $.ui.tooltip); Link Here
250
    </script>
250
    </script>
251
[% END %]
251
[% END %]
252
252
253
[% IF ( Koha.Preference('OPACAutoFill') ) %]
253
[% IF ( Koha.Preference('OPACSuggestionAutoFill') ) %]
254
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/autofill.js"></script>
254
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/autofill.js"></script>
255
[% END %]
255
[% END %]
256
256
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt (-5 / +4 lines)
Lines 41-52 Link Here
41
                            <p>Only certain fields (marked in red) are required, but the more information you enter the easier it will be for the librarians to find the title you're requesting. The "Notes" field can be used to provide any additional information.</p>
41
                            <p>Only certain fields (marked in red) are required, but the more information you enter the easier it will be for the librarians to find the title you're requesting. The "Notes" field can be used to provide any additional information.</p>
42
42
43
                            <form action="/cgi-bin/koha/opac-suggestions.pl" method="post" id="add_suggestion_form">
43
                            <form action="/cgi-bin/koha/opac-suggestions.pl" method="post" id="add_suggestion_form">
44
                                [% IF Koha.Preference( 'OPACAutoFill' ) %]
44
                                [% IF Koha.Preference( 'OPACSuggestionAutoFill' ) %]
45
                                <fieldset class="rows well" style="margin-bottom: 3em;padding-top: 5px;">
45
                                <fieldset class="rows well" style="margin-bottom: 3em;padding-top: 5px;">
46
                                    <label for="isbn">Standard number (ISBN, ISSN or other):</label><input type="text" id="isbn" name="isbn"  maxlength="80" />
46
                                    <label for="isbn">Standard number (ISBN, ISSN or other):</label><input type="text" id="isbn" name="isbn"  maxlength="80" />
47
                                </fieldset>
47
                                </fieldset>
48
                                [% END %]
48
                                [% END %]
49
                                    <fieldset class="rows [% IF Koha.Preference( 'OPACAutoFill' ) %]well[% END %]">
49
                                    <fieldset class="rows [% IF Koha.Preference( 'OPACSuggestionAutoFill' ) %]well[% END %]">
50
                                    <ol>
50
                                    <ol>
51
                                        <li>
51
                                        <li>
52
                                            [% IF ( title_required ) %]
52
                                            [% IF ( title_required ) %]
Lines 81-87 Link Here
81
                                            </div>
81
                                            </div>
82
                                        </li>
82
                                        </li>
83
83
84
                                        [% IF NOT Koha.Preference( 'OPACAutoFill' ) %]
84
                                        [% IF NOT Koha.Preference( 'OPACSuggestionAutoFill' ) %]
85
                                            <li>
85
                                            <li>
86
                                                [% IF ( isbn_required ) %]
86
                                                [% IF ( isbn_required ) %]
87
                                                    <label for="isbn" class="required">Standard number (ISBN, ISSN or other):</label>
87
                                                    <label for="isbn" class="required">Standard number (ISBN, ISSN or other):</label>
Lines 405-411 Link Here
405
        }
405
        }
406
    [% END %]
406
    [% END %]
407
407
408
    [% IF Koha.Preference( 'OPACAutoFill' ) %]
408
    [% IF Koha.Preference( 'OPACSuggestionAutoFill' ) %]
409
    $(function() {
409
    $(function() {
410
        $('#isbn').autofill({
410
        $('#isbn').autofill({
411
            'volumeInfo.title': {target: 'title', effect: 'flash'},
411
            'volumeInfo.title': {target: 'title', effect: 'flash'},
412
- 

Return to bug 14242