Bug 42292: (QA follow-up) replace remaining OD_password_required with Koha.prefs.OverDrivePasswordRequired
As in opac-user.tt OD_password_required was replaced by Koha.prefs.OverDrivePasswordRequired. The script overdrive.js checks already for the Koha.prefs variable. 1) Set sysprefs: OPACOverDrive, OverDriveCirculation, OverDrivePasswordRequired = Enable/Yes; OverDriveClientKey, OverDriveClientSecret, OverDriveLibraryID = any non-empty value (e.g. 123). 2) Go to <opac_url>/cgi-bin/koha/opac-user.pl, click "Log in to your OverDrive account" - password modal appears (correct). 3) Go to <opac_url>/cgi-bin/koha/opac-overdrive-search.pl?q=music, click the same link, it fails with "No password provided" instead, no modal. 4) apply patch and repeat 3) The modal appears now. Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
parent
c2514018b4
commit
2fe11906a7
|
|
@ -84,11 +84,11 @@
|
|||
[% BLOCK jsinclude %]
|
||||
[% Asset.js("js/overdrive.js") | $raw %]
|
||||
<script nonce="[% Koha.CSPNonce | $raw %]" data-tt-allowed="true">
|
||||
[%- IF Koha.Preference('OverDrivePasswordRequired') -%]
|
||||
var OD_password_required = 1;
|
||||
[%- ELSE -%]
|
||||
var OD_password_required = 0;
|
||||
[%- END -%]
|
||||
[% IF ( Koha.Preference('OverDriveCirculation') ) %]
|
||||
Koha.addPrefs({
|
||||
OverDrivePasswordRequired: [% Koha.Preference('OverDrivePasswordRequired') ? 1 : 0 | html %],
|
||||
});
|
||||
[% END %]
|
||||
var querystring = "[% q |replace( "'", "\'" ) |replace( '\n', '\\n' ) |replace( '\r', '\\r' ) | html %]";
|
||||
var results_per_page = [% OPACnumSearchResults | html %];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue