- Changes to the way patron renewals are handled. Circulation page now offers 'renew' link alongside warning about patron expiration (as in dev_week), using the new setstatus script.

- Member pages now use member toolbar include instead of circ one
- setstatus.pl now uses 3.0's patron renewal function
- Adding missing item-bullet.gif (Bug 1659)

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Owen Leonard 2007-12-17 19:22:40 -06:00 committed by Joshua Ferraro
parent d187fc400f
commit 0e675ef820
13 changed files with 35 additions and 20 deletions

View File

@ -120,6 +120,7 @@ my $issueconfirmed = $query->param('issueconfirmed');
my $cancelreserve = $query->param('cancelreserve');
my $organisation = $query->param('organisations');
my $print = $query->param('print');
my $newexpiry = $query->param('dateexpiry');
#set up cookie.....
# my $branchcookie;
@ -632,6 +633,7 @@ $template->param(
printername => $printer,
firstname => $borrower->{'firstname'},
surname => $borrower->{'surname'},
dateexpiry => format_date($newexpiry),
expiry =>
$borrower->{'dateexpiry'}, #format_date($borrower->{'dateexpiry'}),
categorycode => $borrower->{'categorycode'},

View File

@ -16,7 +16,7 @@ function confirm_reregistration() {
var is_confirmed = window.confirm('Are you sure you want to renew this patron\'s registration?');
var borrowernumbervalue1 = $("#borrowernumber").attr("value");
if (is_confirmed) {
window.location='/cgi-bin/koha/members/moremember.pl?reregistration=y&borrowernumber='+borrowernumbervalue1+'';
window.location = '/cgi-bin/koha/members/setstatus.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;cardnumber=<!-- TMPL_VAR NAME="cardnumber" -->&amp;destination=circ&amp;reregistration=y';
}
}

View File

@ -43,9 +43,9 @@
<!-- /TMPL_IF -->
<!-- INITIAL BLOC : PARAMETERS & BORROWER INFO -->
<!-- TMPL_IF NAME="dateexpiry" --><div class="dialog message">Patron's account has been renewed until <!-- TMPL_VAR NAME="dateexpiry" --></div><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="NEEDSCONFIRMATION" -->
<div class="yui-g" style="text-align: center">
<div class="yui-g">
<div id="circ_needsconfirmation" class="dialog alert">
<h3>Please Confirm Checkout</h3>
@ -268,7 +268,10 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
<ul>
<!--TMPL_IF Name="warndeparture"-->
<li><span class="circ-hlt">Expiration:</span> Patron card has expired or will expire soon.</li>
<li><span class="circ-hlt">Expiration:</span> Patron card has expired or will expire soon.
Patron Expires on <!-- TMPL_VAR NAME="expiry" --> <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;cardnumber=<!-- TMPL_VAR NAME="cardnumber" -->&amp;destination=circ&amp;reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?modify=edit&amp;destination=circ&amp;borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->">Edit Details</a>
</li>
<!--/TMPL_IF-->
<!-- TMPL_IF NAME="gna" -->
@ -280,7 +283,8 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="dbarred" --><li class="blocker">
<span class="circ-hlt"> Restricted:</span> Patron's account is restricted <a href="/cgi-bin/koha/members/setdebar.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;cardnumber=<!-- TMPL_VAR NAME="cardnumber" -->&amp;destination=circ&amp;status=0">Lift restriction</a></li><!-- /TMPL_IF -->
<span class="circ-hlt"> Restricted:</span> Patron's account is restricted <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;cardnumber=<!-- TMPL_VAR NAME="cardnumber" -->&amp;destination=circ&amp;status=0">Lift restriction</a>
</li><!-- /TMPL_IF -->
<!-- TMPL_IF name="odues" --><li><!-- TMPL_IF name="nonreturns" --><span class="circ-hlt">Overdues:</span> Patron has <span class="circ-hlt">ITEMS OVERDUE</span>. See highlighted items <a href="#checkouts">below</a><!-- /TMPL_IF --></li>
<!-- /TMPL_IF -->

View File

@ -20,7 +20,7 @@
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<!-- TMPL_INCLUDE NAME="circ-toolbar.inc" -->
<!-- TMPL_INCLUDE NAME="members-toolbar.inc" -->
<form action="/cgi-bin/koha/members/boraccount.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" /></form>
<!-- The manual invoice and credit buttons -->

View File

@ -12,7 +12,7 @@
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<!-- TMPL_INCLUDE NAME="circ-toolbar.inc" --> <h3>Cannot Delete Patron</h3>
<!-- TMPL_INCLUDE NAME="members-toolbar.inc" --><h3>Cannot Delete Patron</h3>
<ul><!-- TMPL_IF name="ItemsOnIssues" -->
<li>Patron has <!-- TMPL_VAR name="ItemsOnIssues" --> item(s) checked out.</li>
<!-- /TMPL_IF -->

View File

@ -20,7 +20,7 @@
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<!-- TMPL_INCLUDE NAME="circ-toolbar.inc" -->
<!-- TMPL_INCLUDE NAME="members-toolbar.inc" -->
<!-- The manual invoice and credit buttons -->
<div class="toptabs">

View File

@ -20,7 +20,7 @@
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<!-- TMPL_INCLUDE NAME="circ-toolbar.inc" -->
<!-- TMPL_INCLUDE NAME="members-toolbar.inc" -->
<!-- The manual invoice and credit buttons -->
<div class="toptabs">

View File

@ -20,7 +20,7 @@
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<!-- TMPL_INCLUDE NAME="circ-toolbar.inc" -->
<!-- TMPL_INCLUDE NAME="members-toolbar.inc" -->
<form method="post" action="/cgi-bin/koha/members/member-flags.pl">
<input type="hidden" name="member" id="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />

View File

@ -20,7 +20,7 @@
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<!-- TMPL_INCLUDE NAME="circ-toolbar.inc" -->
<!-- TMPL_INCLUDE NAME="members-toolbar.inc" -->
<!-- TMPL_IF NAME="newpassword" -->
<h1>Password Updated</h1>

View File

@ -41,7 +41,7 @@ Unable to delete member: insufficient privileges.
<!-- TMPL_IF NAME="unknowuser" -->
This patron does not exist.
<!-- TMPL_ELSE -->
<!-- TMPL_IF NAME="reregistration" --><div class="message">Patron's account has been renewed until <!-- TMPL_VAR NAME="dateexpiry" --></div><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="reregistration" --><div class="dialog message">Patron's account has been renewed until <!-- TMPL_VAR NAME="dateexpiry" --></div><!-- /TMPL_IF -->
<form action="" name="form">
<input type="hidden" name="reregistration" value="<!-- TMPL_VAR NAME="reregistration"-->" />
<input type="hidden" name="borrowernumber" id="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />

View File

@ -20,7 +20,7 @@
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<!-- TMPL_INCLUDE NAME="circ-toolbar.inc" -->
<!-- TMPL_INCLUDE NAME="members-toolbar.inc" -->
<!-- The manual invoice and credit buttons -->
<div class="toptabs">

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 B

View File

@ -26,6 +26,7 @@ use strict;
use CGI;
use C4::Context;
use C4::Members;
use C4::Auth;
@ -39,14 +40,14 @@ my $destination = $input->param("destination");
my $cardnumber = $input->param("cardnumber");
my $borrowernumber=$input->param('borrowernumber');
my $status = $input->param('status');
my $renewaldate = $input->param('renewaldate');
my $reregistration = $input->param('reregistration');
my $dbh = C4::Context->dbh;
my $dateexpiry;
if($renewaldate){
my $sth=$dbh->prepare("Update borrowers set expiry = ? where borrowernumber = ?");
$sth->execute($renewaldate,$borrowernumber);
$sth->finish;
if ( $reregistration eq 'y' ) {
# re-reregistration function to automatic calcul of date expiry
$dateexpiry = ExtendMemberSubscriptionTo( $borrowernumber );
} else {
my $sth=$dbh->prepare("Update borrowers set debarred = ? where borrowernumber = ?");
$sth->execute($status,$borrowernumber);
@ -54,7 +55,15 @@ if($renewaldate){
}
if($destination eq "circ"){
print $input->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=$cardnumber");
if($dateexpiry){
print $input->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=$cardnumber&dateexpiry=$dateexpiry");
} else {
print $input->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=$cardnumber");
}
} else {
print $input->redirect("/cgi-bin/koha/members/moremember.pl?bornum=$borrowernumber");
if($dateexpiry){
print $input->redirect("/cgi-bin/koha/members/moremember.pl?bornum=$borrowernumber&dateexpiry=$dateexpiry");
} else {
print $input->redirect("/cgi-bin/koha/members/moremember.pl?bornum=$borrowernumber");
}
}