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

(-)a/installer/data/mysql/atomicupdate/bug_31274.pl (+20 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "31274",
5
    description => "OPACSuggestionAutoFill must be 1 or 0",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
10
        $dbh->do(q{
11
            UPDATE systempreferences
12
            SET value = CASE
13
                            WHEN value='no'  THEN 0
14
                            WHEN value='yes' THEN 1
15
                            ELSE value
16
                        END
17
            WHERE variable='OPACSuggestionAutoFill';
18
        });
19
    },
20
};
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-2 / +2 lines)
Lines 518-525 OPAC: Link Here
518
            - pref: OPACSuggestionAutoFill
518
            - pref: OPACSuggestionAutoFill
519
              default: 0
519
              default: 0
520
              choices:
520
              choices:
521
                  yes: Enable
521
                  1: Enable
522
                  no: Disable
522
                  0: Disable
523
            - OPAC suggestions form automatically filling with data from Google Books API.
523
            - OPAC suggestions form automatically filling with data from Google Books API.
524
        -
524
        -
525
            - "Use the following as the OPAC ISBD template:"
525
            - "Use the following as the OPAC ISBD template:"
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt (-2 / +1 lines)
Lines 497-503 Link Here
497
497
498
[% INCLUDE 'opac-bottom.inc' %]
498
[% INCLUDE 'opac-bottom.inc' %]
499
[% BLOCK jsinclude %]
499
[% BLOCK jsinclude %]
500
[% IF ( Koha.Preference("OPACSuggestionAutoFill") != 'no' ) %]
500
[% IF Koha.Preference("OPACSuggestionAutoFill") %]
501
    [% Asset.js("js/autofill.js") | $raw %]
501
    [% Asset.js("js/autofill.js") | $raw %]
502
[% END %]
502
[% END %]
503
[% INCLUDE 'datatables.inc' %]
503
[% INCLUDE 'datatables.inc' %]
504
- 

Return to bug 31274