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 329-335 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
329
('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'),
329
('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'),
330
('OAI-PMH:MaxCount','50',NULL,'OAI-PMH maximum number of records by answer to ListRecords and ListIdentifiers queries','Integer'),
330
('OAI-PMH:MaxCount','50',NULL,'OAI-PMH maximum number of records by answer to ListRecords and ListIdentifiers queries','Integer'),
331
('OPACAcquisitionDetails','0','','Show the acquisition details at the OPAC','YesNo'),
331
('OPACAcquisitionDetails','0','','Show the acquisition details at the OPAC','YesNo'),
332
('OPACAutoFill','0',NULL,'Automaticly fill forms with data from Google Books API','YesNo'),
332
('OPACSuggestionAutoFill','0',NULL,'Automaticly fill forms with data from Google Books API','YesNo'),
333
('OpacAddMastheadLibraryPulldown','0','','Adds a pulldown menu to select the library to search on the opac masthead.','YesNo'),
333
('OpacAddMastheadLibraryPulldown','0','','Adds a pulldown menu to select the library to search on the opac masthead.','YesNo'),
334
('OpacAdvSearchMoreOptions','pubdate,itemtype,language,subtype,sorting,location','Show search options for the expanded view (More options)','pubdate|itemtype|language|subtype|sorting|location','multiple'),
334
('OpacAdvSearchMoreOptions','pubdate,itemtype,language,subtype,sorting,location','Show search options for the expanded view (More options)','pubdate|itemtype|language|subtype|sorting|location','multiple'),
335
('OpacAdvSearchOptions','pubdate,itemtype,language,sorting,location','Show search options','pubdate|itemtype|language|subtype|sorting|location','multiple'),
335
('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 513-519 OPAC: Link Here
513
                  no: Don't display
513
                  no: Don't display
514
            - a branch selection list for news items in the OPAC.
514
            - a branch selection list for news items in the OPAC.
515
        -
515
        -
516
            - pref: OPACAutoFill
516
            - pref: OPACSuggestionAutoFill
517
              default: 0
517
              default: 0
518
              choices:
518
              choices:
519
                  yes: Enable
519
                  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><label for="title">Title:</label><input type="text" id="title" name="title" class="span6" maxlength="255" /></li>
51
                                        <li><label for="title">Title:</label><input type="text" id="title" name="title" class="span6" maxlength="255" /></li>
52
                                        <li><label for="author">Author:</label><input type="text" id="author" name="author" class="span6" maxlength="80" /></li>
52
                                        <li><label for="author">Author:</label><input type="text" id="author" name="author" class="span6" maxlength="80" /></li>
Lines 55-61 Link Here
55
                                            <label for="copyrightdate">Copyright date:</label><input type="text" id="copyrightdate" name="copyrightdate" pattern="[12]\d{3}" size="4" maxlength="4" />
55
                                            <label for="copyrightdate">Copyright date:</label><input type="text" id="copyrightdate" name="copyrightdate" pattern="[12]\d{3}" size="4" maxlength="4" />
56
                                            </div>
56
                                            </div>
57
                                        </li>
57
                                        </li>
58
                                        [% IF NOT Koha.Preference( 'OPACAutoFill' ) %]
58
                                        [% IF NOT Koha.Preference( 'OPACSuggestionAutoFill' ) %]
59
                                        <li><label for="isbn">Standard number (ISBN, ISSN or other):</label><input type="text" id="isbn" name="isbn" maxlength="80" /></li>
59
                                        <li><label for="isbn">Standard number (ISBN, ISSN or other):</label><input type="text" id="isbn" name="isbn" maxlength="80" /></li>
60
                                        [% END %]
60
                                        [% END %]
61
                                        <li><label for="publishercode">Publisher:</label><input type="text" id="publishercode" name="publishercode" class="span6" maxlength="80" /></li>
61
                                        <li><label for="publishercode">Publisher:</label><input type="text" id="publishercode" name="publishercode" class="span6" maxlength="80" /></li>
Lines 300-306 Link Here
300
        }
300
        }
301
    [% END %]
301
    [% END %]
302
302
303
    [% IF Koha.Preference( 'OPACAutoFill' ) %]
303
    [% IF Koha.Preference( 'OPACSuggestionAutoFill' ) %]
304
    $(function() {
304
    $(function() {
305
        $('#isbn').autofill({
305
        $('#isbn').autofill({
306
            'volumeInfo.title': {target: 'title', effect: 'flash'},
306
            'volumeInfo.title': {target: 'title', effect: 'flash'},
307
- 

Return to bug 14242