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 278-284 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
278
('OAI-PMH:MaxCount','50',NULL,'OAI-PMH maximum number of records by answer to ListRecords and ListIdentifiers queries','Integer'),
278
('OAI-PMH:MaxCount','50',NULL,'OAI-PMH maximum number of records by answer to ListRecords and ListIdentifiers queries','Integer'),
279
('OCLCAffiliateID','','','Use with FRBRizeEditions and XISBN. You can sign up for an AffiliateID here: http://www.worldcat.org/wcpa/do/AffiliateUserServices?method=initSelfRegister','free'),
279
('OCLCAffiliateID','','','Use with FRBRizeEditions and XISBN. You can sign up for an AffiliateID here: http://www.worldcat.org/wcpa/do/AffiliateUserServices?method=initSelfRegister','free'),
280
('OPACAcquisitionDetails','0','','Show the acquisition details at the OPAC','YesNo'),
280
('OPACAcquisitionDetails','0','','Show the acquisition details at the OPAC','YesNo'),
281
('OPACAutoFill','0',NULL,'Automaticly fill forms with data from Google Books API','YesNo'),
281
('OPACSuggestionAutoFill','0',NULL,'Automaticly fill forms with data from Google Books API','YesNo'),
282
('OpacAddMastheadLibraryPulldown','0','','Adds a pulldown menu to select the library to search on the opac masthead.','YesNo'),
282
('OpacAddMastheadLibraryPulldown','0','','Adds a pulldown menu to select the library to search on the opac masthead.','YesNo'),
283
('OpacAdvSearchMoreOptions','pubdate,itemtype,language,subtype,sorting,location','Show search options for the expanded view (More options)','pubdate|itemtype|language|subtype|sorting|location','multiple'),
283
('OpacAdvSearchMoreOptions','pubdate,itemtype,language,subtype,sorting,location','Show search options for the expanded view (More options)','pubdate|itemtype|language|subtype|sorting|location','multiple'),
284
('OpacAdvSearchOptions','pubdate,itemtype,language,sorting,location','Show search options','pubdate|itemtype|language|subtype|sorting|location','multiple'),
284
('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 503-509 OPAC: Link Here
503
                  no: Don't display
503
                  no: Don't display
504
            - the acquisition details on OPAC detail pages.
504
            - the acquisition details on OPAC detail pages.
505
        -
505
        -
506
            - pref: OPACAutoFill
506
            - pref: OPACSuggestionAutoFill
507
              default: 0
507
              default: 0
508
              choices:
508
              choices:
509
                  yes: Enable
509
                  yes: Enable
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc (-1 / +1 lines)
Lines 214-220 $.widget.bridge('uitooltip', $.ui.tooltip); Link Here
214
    </script>
214
    </script>
215
[% END %]
215
[% END %]
216
216
217
[% IF ( Koha.Preference('OPACAutoFill') ) %]
217
[% IF ( Koha.Preference('OPACSuggestionAutoFill') ) %]
218
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/autofill.js"></script>
218
    <script type="text/javascript" src="[% interface %]/[% theme %]/js/autofill.js"></script>
219
[% END %]
219
[% END %]
220
220
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt (-5 / +4 lines)
Lines 39-50 Link Here
39
                            <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>
39
                            <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>
40
40
41
                            <form action="/cgi-bin/koha/opac-suggestions.pl" method="post" id="add_suggestion_form">
41
                            <form action="/cgi-bin/koha/opac-suggestions.pl" method="post" id="add_suggestion_form">
42
                                [% IF Koha.Preference( 'OPACAutoFill' ) %]
42
                                [% IF Koha.Preference( 'OPACSuggestionAutoFill' ) %]
43
                                <fieldset class="rows well" style="margin-bottom: 3em;padding-top: 5px;">
43
                                <fieldset class="rows well" style="margin-bottom: 3em;padding-top: 5px;">
44
                                    <label for="isbn">Standard number (ISBN, ISSN or other):</label><input type="text" id="isbn" name="isbn"  maxlength="80" />
44
                                    <label for="isbn">Standard number (ISBN, ISSN or other):</label><input type="text" id="isbn" name="isbn"  maxlength="80" />
45
                                </fieldset>
45
                                </fieldset>
46
                                [% END %]
46
                                [% END %]
47
                                    <fieldset class="rows [% IF Koha.Preference( 'OPACAutoFill' ) %]well[% END %]">
47
                                    <fieldset class="rows [% IF Koha.Preference( 'OPACSuggestionAutoFill' ) %]well[% END %]">
48
                                    <ol>
48
                                    <ol>
49
                                        <li><label for="title">Title:</label><input type="text" id="title" name="title" class="span6" maxlength="255" /></li>
49
                                        <li><label for="title">Title:</label><input type="text" id="title" name="title" class="span6" maxlength="255" /></li>
50
                                        <li><label for="author">Author:</label><input type="text" id="author" name="author" class="span6" maxlength="80" /></li>
50
                                        <li><label for="author">Author:</label><input type="text" id="author" name="author" class="span6" maxlength="80" /></li>
Lines 53-59 Link Here
53
                                            <label for="copyrightdate">Copyright date:</label><input type="text" id="copyrightdate" name="copyrightdate" pattern="[12]\d{3}" size="4" maxlength="4" />
53
                                            <label for="copyrightdate">Copyright date:</label><input type="text" id="copyrightdate" name="copyrightdate" pattern="[12]\d{3}" size="4" maxlength="4" />
54
                                            </div>
54
                                            </div>
55
                                        </li>
55
                                        </li>
56
                                        [% IF NOT Koha.Preference( 'OPACAutoFill' ) %]
56
                                        [% IF NOT Koha.Preference( 'OPACSuggestionAutoFill' ) %]
57
                                        <li><label for="isbn">Standard number (ISBN, ISSN or other):</label><input type="text" id="isbn" name="isbn" maxlength="80" /></li>
57
                                        <li><label for="isbn">Standard number (ISBN, ISSN or other):</label><input type="text" id="isbn" name="isbn" maxlength="80" /></li>
58
                                        [% END %]
58
                                        [% END %]
59
                                        <li><label for="publishercode">Publisher:</label><input type="text" id="publishercode" name="publishercode" class="span6" maxlength="80" /></li>
59
                                        <li><label for="publishercode">Publisher:</label><input type="text" id="publishercode" name="publishercode" class="span6" maxlength="80" /></li>
Lines 297-303 Link Here
297
        }
297
        }
298
    [% END %]
298
    [% END %]
299
299
300
    [% IF Koha.Preference( 'OPACAutoFill' ) %]
300
    [% IF Koha.Preference( 'OPACSuggestionAutoFill' ) %]
301
    $(function() {
301
    $(function() {
302
        $('#isbn').autofill({
302
        $('#isbn').autofill({
303
            'volumeInfo.title': {target: 'title', effect: 'flash'},
303
            'volumeInfo.title': {target: 'title', effect: 'flash'},
304
- 

Return to bug 14242