Bug 20686: OPAC shows 'Login to OverDrive account' with 'OverDriveCirculation' syspref disabled

ps: you will need an active and working overdrive account to test this patch

1/ prepare a koha with overdrive sysprefs set and working
    (OverDriveLibraryID,OverDriveClientKey,OverDriveClientSecret)

2/ set OverDriveCirculation syspref to 'disable'

3/ do an opac search, note the 'Login to OverDrive account' message is incorrectly displayed
    see pic 1

4/ apply patch

5/ do an opac search, note the 'Login to OverDrive account' message is no longer displayed (good)
    see pic 2

Can confirm that bug is replicable and patch applies and functions as described.
Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Mason James 2018-05-01 13:24:37 +12:00 committed by Jonathan Druart
parent 23aa986612
commit affd3f0ece

View file

@ -187,7 +187,7 @@ $( document ).ready( function() {
[% IF ( overdrive_error ) %]
KOHA.OverDriveCirculation.display_error("#breadcrumbs", "[% overdrive_error.dquote %]");
[% END %]
[% IF ( loggedinusername ) %]
[% IF ( loggedinusername and OverDriveCirculation ) %]
KOHA.OverDriveCirculation.with_account_details("#breadcrumbs", function() {
search( 0 );
});