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 <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2016-08-16 13:56:19 +01:00 committed by Kyle M Hall
parent a8fdac38d8
commit acabdc87c9
3 changed files with 13 additions and 13 deletions

View file

@ -1051,7 +1051,7 @@ sub checkauth {
$branchname = $library? $library->branchname: '';
}
my $branches = { map { $_->branchcode => $_->unblessed } Koha::Libraries->search };
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'};

View file

@ -54,17 +54,17 @@
<input type="password" name="password" id="password" class="input" value="" size="20" tabindex="2" />
</p>
[% IF ( AutoLocation ) %][% ELSE %]
[% IF ( IndependentBranches ) %][% ELSE %]
<p><label for="branch">Library:</label>
<select name="branch" id="branch" class="input" tabindex="3">
<option value="">My library</option>
[% FOREACH l IN Branches.all( unfiltered => 1 ) %]
<option value="[% l.branchcode %]">[% l.branchname %]</option>
[% END %]
</select>
</p>[% END %]
[% END %]
[% UNLESS IndependentBranches %]
<p>
<label for="branch">Library:</label>
<select name="branch" id="branch" class="input" tabindex="3">
<option value="">My library</option>
[% FOREACH l IN Branches.all( unfiltered => 1 ) %]
<option value="[% l.branchcode %]">[% l.branchname %]</option>
[% END %]
</select>
</p>
[% END %]
<!-- <p><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="3" />Remember me</label></p> -->

View file

@ -24,7 +24,7 @@
[% IF ( display_transfer ) %]
<li><a href="/cgi-bin/koha/circ/branchtransfers.pl">Transfer</a></li>
[% END %]
[% IF ( AutoLocation ) %][% ELSE %][% IF ( IndependentBranches ) %][% ELSE %]<li><a href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set library</a></li>[% END %][% END %]
[% UNLESS IndependentBranches %]<li><a href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set library</a></li>[% END %]
[% IF ( fast_cataloging ) %]
[% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
<li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA">Fast cataloging</a></li>