From f97589ddd12cdfe0eda258ee4f30de7738b44952 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 16 Aug 2016 13:56:19 +0100 Subject: [PATCH] Bug 9569: AutoLocation should not depend on IndependentBranches Those 2 prefs can be independent and it does not make sense to consider AutoLocation only if IndependentBranches is set. Signed-off-by: Chris Cormack Signed-off-by: Nick Clemens Signed-off-by: Kyle M Hall (cherry picked from commit acabdc87c9a883e36def78dcff6fccb4980d35ab) Signed-off-by: Julian Maurice --- C4/Auth.pm | 2 +- .../intranet-tmpl/prog/en/modules/auth.tt | 22 +++++++++---------- .../prog/en/modules/circ/circulation-home.tt | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 03b8c4c5c1..7480a4ac7e 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -1076,7 +1076,7 @@ sub checkauth { $branchname = GetBranchName($branchcode); } my $branches = GetBranches(); - if ( C4::Context->boolean_preference('IndependentBranches') && C4::Context->boolean_preference('Autolocation') ) { + if ( C4::Context->boolean_preference('Autolocation') ) { # we have to check they are coming from the right ip range my $domain = $branches->{$branchcode}->{'branchip'}; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt index 411c563a1d..318d5fbce4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt @@ -52,17 +52,17 @@

-[% IF ( AutoLocation ) %][% ELSE %] -[% IF ( IndependentBranches ) %][% ELSE %] -

- -

[% END %] - [% END %] +[% UNLESS IndependentBranches %] +

+ + +

+[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt index 713c64f039..430002bc55 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt @@ -24,7 +24,7 @@ [% IF ( display_transfer ) %]
  • Transfer
  • [% END %] - [% IF ( AutoLocation ) %][% ELSE %][% IF ( IndependentBranches ) %][% ELSE %]
  • Set library
  • [% END %][% END %] + [% UNLESS IndependentBranches %]
  • Set library
  • [% END %] [% IF ( fast_cataloging ) %] [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
  • Fast cataloging
  • -- 2.39.5