3d377cd7c1
NOTE: This patch introduces code which generates an anonymous session when a patron first browses to OPAC. This anonymous session contains a minimal amount of information including the results of a query to discover all public lists/shevles. When the user logs in, the anonymous session is cleared and a new session created for that user. kohabug 1875 - fix error when editing a patron record C4::Auth::checkauth was not distinguishing between a 'userid' input from an OPAC or staff login form and a 'userid' input from (e.g.,) the patron editor. Consequently, adding or editing a patron record would result in Koha trying to log in as the new patron. To resolve this, added a hidden input to all login forms, 'koha_login_context', to explicitly signal when a login is occurring. The value of this input can be 'opac', 'intranet', or 'sco' - the value is not used at present, but may be of use later. C4::Auth - added debug flag to two warns kohabug 1875 - create anonymous sessions only for OPAC No need to create an anonymous session for the intranet. set yuipath correct for login pages When preparing the template parameters for a login form, C4::Auth was overriding the value of yuipath set by C4::Output::gettemplate(), thus causing 404 errors if the 'yuipath' syspref was set to 'local'. kohabug 1875 - avoid warns viewing lists anonymously During an anonymous OPAC session, the $loggedinuser variable is not set. As the undefined value causes warns in C4::VirtualShelves::Page::shelfpage, for the purpose of the shelfpage call the loggedinuser is set to -1, which should not correspond to any real borrower number. This is admittedly a hack to avoid digging through all of C4::VirtualShelves to deal with lists viewed anonymously. kohabug 1875 Refactoring of &ModShelf to avoid overwriting list owner needlessly kohabug 1875 Avoid warning if can't find owner of shelf Since virtualshelves.owner is not a true FK of borrowersnumber.number, set ownername to '' if can't find the patron Signed-off-by: Joshua Ferraro <jmf@liblime.com>
74 lines
3.1 KiB
Cheetah
74 lines
3.1 KiB
Cheetah
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
|
|
<title>Koha ›
|
|
<!-- TMPL_IF NAME="nopermission" -->Access denied<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="timed_out" -->Session timed out<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="different_ip" -->IP address change<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="invalid_username_or_password" -->Invalid username or password<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="loginprompt" -->Log in to Koha<!-- /TMPL_IF -->
|
|
</title>
|
|
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
|
</head>
|
|
<body>
|
|
|
|
<div id="doc" class="yui-t7">
|
|
<div id="bd">
|
|
|
|
<div id="login">
|
|
<h1><a href="http://koha.org">Koha</a></h1>
|
|
<!-- TMPL_IF NAME="nopermission" -->
|
|
<div id="login_error"><strong>Error: </strong>Unauthorized user<a href="/cgi-bin/koha/mainpage.pl?logout.x=1">click to log out</a></div>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="timed_out" -->
|
|
<div id="login_error"><strong>Error: </strong>Session timed out, please log in again</div>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="different_ip" -->
|
|
<div id="login_error"><strong>Error: </strong>IP address has changed, please log in again </div>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="wrongip" -->
|
|
<div id="login_error"><strong>Error: </strong>Independent Branches and Autolocation are switched on and you are logging in with an IP address that doesn't match your branch. </div>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="invalid_username_or_password" -->
|
|
<div id="login_error"><strong>Error: </strong>Invalid username or password</div>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- login prompt time-->
|
|
<form action="<!-- TMPL_VAR NAME="url" -->" method="post" name="loginform" id="loginform">
|
|
<input type="hidden" name="koha_login_context" value="intranet" />
|
|
<!-- TMPL_LOOP NAME="INPUTS" -->
|
|
<input type="hidden" name="<!-- TMPL_VAR NAME="name" -->" value="<!-- TMPL_VAR NAME="value" ESCAPE="html" -->" />
|
|
<!-- /TMPL_LOOP -->
|
|
<p><label for="userid">Username:</label>
|
|
<input type="text" name="userid" id="userid" class="input focus" value="<!-- TMPL_VAR NAME="userid" -->" size="20" tabindex="1" />
|
|
</p>
|
|
<p><label for="password">Password:</label>
|
|
<input type="password" name="password" id="password" class="input" value="" size="20" tabindex="2" />
|
|
</p>
|
|
|
|
<!-- TMPL_IF NAME="AutoLocation" --><!-- TMPL_ELSE -->
|
|
<!-- TMPL_IF NAME="IndependantBranches" --><!-- TMPL_ELSE -->
|
|
<p><label for="branch">Library:</label>
|
|
<select name="branch" id="branch" class="input" tabindex="3">
|
|
<option value="">My Library</option>
|
|
<!-- TMPL_LOOP NAME="branchloop" -->
|
|
<option value="<!-- TMPL_VAR NAME='branchcode' -->"><!-- TMPL_VAR NAME='branchname' --></option>
|
|
<!-- /TMPL_LOOP -->
|
|
</select>
|
|
</p><!-- /TMPL_IF -->
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- <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 »" tabindex="4" /></p>
|
|
</form>
|
|
<!--<ul> -->
|
|
<!-- <li><a href="/cgi-bin/koha/lostpassword.pl" title="Password Lost and Found">Lost your password?</a></li> -->
|
|
<!-- </ul> -->
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
|