Kyle M Hall
218194fab0
Currently, when SingleBranchMode is enabled, nobody can change the logged in library in Koha. To change it requires disable SingleBranchMode, switching the library, and re-enabling it. It seems reasonable to allow superlibrarians to switch the logged in library even if SingleBranchMode is enabled. Test Plan: 1) Apply this patch 3) Enable SingleBranchMode 4) Log in as a superlibrarian 5) Attempt to change the logged in branch This change should succeed 6) Log in as a non-superlibrarian account 7) Attempt to change the logged n branch This should not be allowed, as per Koha's current behavior Signed-off-by: Owen Leonard <oleonard@myacpl.org> I guess this doesn't do any harm even though the practical motivations behind it, as described in the bug, seem otherwise solvable. If SingleBranchMode is supposed to prevent librarians from switching their logged in library why can they choose their library when they first log in? Was SingleBranchMode supposed to only affect the OPAC originally? Or should the login form be modified? This seems to be a band-aid on a poorly-implemented feature. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Patch works as decribed. As this only adds a check for a superlibrarian it seems safe and should not interfere with normal staff accounts. Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
95 lines
3.2 KiB
Text
95 lines
3.2 KiB
Text
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Circulation › Set library</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
<style type="text/css">
|
|
.noshow {display: none;}
|
|
</style>
|
|
</head>
|
|
<body id="circ_selectbranchprinter" class="circ">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'circ-search.inc' %]
|
|
|
|
<div id="breadcrumbs">
|
|
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
|
|
› <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
|
|
› <a href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set library</a>
|
|
</div>
|
|
|
|
<div id="doc" class="yui-t7">
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
[% IF ( updated ) %]
|
|
|
|
<h2>Update succeeded</h2>
|
|
Updated:<ul>
|
|
[% FOREACH update IN updated %]
|
|
[% IF ( update.updated_branch ) %]
|
|
<li>Library: [% update.old_branch or "?" %] ⇒ [% update.LoginBranchcode or "?" %]</li>
|
|
[% ELSIF ( update.updated_printer ) %]
|
|
<!-- FIXME: <li>Printer: [% update.old_printer or "?" %] ⇒ [% update.new_printer or "?" %]</li> -->
|
|
[% ELSE %]
|
|
<li>ERROR - unknown</li>
|
|
[% END %]
|
|
[% END %]
|
|
</ul>
|
|
<form method="post" action="[% referer or "/cgi-bin/koha/circ/circulation.pl" |html %]">
|
|
<div class="noshow">
|
|
[% FOREACH recycle_loo IN recycle_loop %]
|
|
<input type="text" name="[% recycle_loo.param %]" value="[% recycle_loo.value |html %]" />
|
|
[% END %]
|
|
</div>
|
|
<button type="submit">Continue</button>
|
|
</form>
|
|
|
|
[% ELSE %]
|
|
|
|
<form method="post" action="selectbranchprinter.pl">
|
|
<fieldset class="rows">
|
|
<legend>Set library</legend>
|
|
<ol>
|
|
[% IF ( singleBranchMode && !CAN_user_superlibrarian ) %]
|
|
<li>SingleBranchMode is ON.</li>
|
|
[% ELSE %]
|
|
<li><label for="branch">Choose library:</label>
|
|
<select name="branch" id="branch">
|
|
[% FOREACH branchloo IN branchloop %]
|
|
[% IF ( branchloo.selected ) %]
|
|
<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
|
|
[% ELSE %]
|
|
<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select></li>
|
|
[% END %]
|
|
<!--
|
|
[% IF ( printerloop ) %]
|
|
<li><label for="printer">Choose a network printer:</label>
|
|
<select name="printer" id="printer">
|
|
[% FOREACH printerloo IN printerloop %]
|
|
[% IF ( printerloo.selected ) %]
|
|
<option value="[% printerloo.value %]" selected="selected">[% printerloo.name %]</option>
|
|
[% ELSE %]
|
|
<option value="[% printerloo.value %]">[% printerloo.name %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select></li>
|
|
[% END %] -->
|
|
</ol>
|
|
</fieldset>
|
|
<fieldset class="action"><input type="submit" value="Submit" /></fieldset>
|
|
<div class="noshow">
|
|
[% FOREACH recycle_loo IN recycle_loop %]
|
|
<input type="text" name="[% recycle_loo.param %]" value="[% recycle_loo.value |html %]" />
|
|
[% END %]
|
|
<input type="hidden" name="oldreferer" value="[% referer or "/cgi-bin/koha/circ/circulation.pl" |html %]" />
|
|
</div>
|
|
</form>
|
|
<!-- /updated -->
|
|
[% END %]
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|