IndependantBranches behaviour fix
authorPaul POULAIN <paul@koha-fr.org>
Wed, 24 Oct 2007 18:31:40 +0000 (13:31 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Wed, 24 Oct 2007 22:02:24 +0000 (17:02 -0500)
if IndependantBranches is set, then the user can't choose it's branch, it's automatically affected to it's own branch.

This fix removes the branch list & choose the branch automatically from the login

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Auth.pm
koha-tmpl/intranet-tmpl/prog/en/modules/auth.tmpl

index 7310f7a..31eee88 100755 (executable)
@@ -254,7 +254,8 @@ sub get_template_and_user {
             virtualshelves          => C4::Context->preference("virtualshelves"),
             LibraryName             => C4::Context->preference("LibraryName"),
             KohaAdminEmailAddress   => "" . C4::Context->preference("KohaAdminEmailAddress"),
-                       IntranetmainUserblock   => C4::Context->preference("IntranetmainUserblock"),
+            IntranetmainUserblock      => C4::Context->preference("IntranetmainUserblock"),
+            IndependantBranches     => C4::Context->preference("IndependantBranches"),
         );
     }
     else {
@@ -721,7 +722,7 @@ sub checkauth {
         IntranetNav        => C4::Context->preference("IntranetNav"),
         intranetuserjs     => C4::Context->preference("intranetuserjs"),
         TemplateEncoding   => C4::Context->preference("TemplateEncoding"),
-
+        IndependantBranches     => C4::Context->preference("IndependantBranches"),
     );
     $template->param( loginprompt => 1 ) unless $info{'nopermission'};
 
index 30354db..348062e 100644 (file)
 <p><label>Password:<br />
 <input type="password" name="password" id="password" class="input" value="" size="20" tabindex="2" /></label>
 </p>
-<p><label for="branch">Library:<br />
-<select name="branch" id="branch" class="input">
-<!-- TMPL_LOOP NAME="branchloop" -->
-<option value="<!-- TMPL_VAR NAME='branchcode' -->"><!-- TMPL_VAR NAME='branchname' --></option>
-<!-- /TMPL_LOOP -->
-</select></label>
-</p>
+<!-- TMPL_UNLESS name="IndependantBranches" -->
+    <p><label for="branch">Library:<br />
+    <select name="branch" id="branch" class="input">
+    <!-- TMPL_LOOP NAME="branchloop" -->
+    <option value="<!-- TMPL_VAR NAME='branchcode' -->"><!-- TMPL_VAR NAME='branchname' --></option>
+    <!-- /TMPL_LOOP -->
+    </select></label>
+    </p>
+<!-- /TMPL_UNLESS -->
 <!-- <p><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="3" />Remember me</label></p> -->
 
 <p class="submit"><input id="submit" type="submit" value="Login &raquo;" tabindex="4" /></p>