From 0e675ef8205f2d9703cec28478a2ef70c7c2ea18 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 17 Dec 2007 19:22:40 -0600 Subject: [PATCH] - 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 Signed-off-by: Joshua Ferraro --- circ/circulation.pl | 2 ++ .../prog/en/includes/circ-toolbar.inc | 2 +- .../prog/en/modules/circ/circulation.tmpl | 12 ++++++--- .../prog/en/modules/members/boraccount.tmpl | 2 +- .../prog/en/modules/members/deletemem.tmpl | 2 +- .../prog/en/modules/members/mancredit.tmpl | 2 +- .../prog/en/modules/members/maninvoice.tmpl | 2 +- .../prog/en/modules/members/member-flags.tmpl | 2 +- .../en/modules/members/member-password.tmpl | 2 +- .../prog/en/modules/members/moremember.tmpl | 2 +- .../prog/en/modules/members/pay.tmpl | 2 +- .../intranet-tmpl/prog/img/item-bullet.gif | Bin 0 -> 59 bytes members/setstatus.pl | 23 ++++++++++++------ 13 files changed, 35 insertions(+), 20 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/img/item-bullet.gif diff --git a/circ/circulation.pl b/circ/circulation.pl index 3c2af2d0f8..28a43f1de5 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -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'}, diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc index cc10df5598..5490aa46d0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-toolbar.inc @@ -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=&cardnumber=&destination=circ&reregistration=y'; } } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl index c2cd1cb0bf..86686540b7 100755 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl @@ -43,9 +43,9 @@ - +
Patron's account has been renewed until
-
+

Please Confirm Checkout

@@ -268,7 +268,10 @@ No patron matched
    -
  • Expiration: Patron card has expired or will expire soon.
  • +
  • Expiration: Patron card has expired or will expire soon. + Patron Expires on &cardnumber=&destination=circ&reregistration=y">Renew or ">Edit Details + +
  • @@ -280,7 +283,8 @@ No patron matched
  • - Restricted: Patron's account is restricted &cardnumber=&destination=circ&status=0">Lift restriction
  • + Restricted: Patron's account is restricted &cardnumber=&destination=circ&status=0">Lift restriction +
  • Overdues: Patron has ITEMS OVERDUE. See highlighted items below
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tmpl index ed43eb252d..194337d5f1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tmpl @@ -20,7 +20,7 @@
    - +
    " />
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tmpl index 1aa469f6dc..b69fe6ca05 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tmpl @@ -12,7 +12,7 @@
    -

    Cannot Delete Patron

    +

    Cannot Delete Patron

    • Patron has item(s) checked out.
    • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tmpl index 01a12e341d..278c81a653 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tmpl @@ -20,7 +20,7 @@
      - +
      diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tmpl index 3973f161f8..a3cbe5f2b3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tmpl @@ -20,7 +20,7 @@
      - +
      diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tmpl index d30bee410b..93af845334 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tmpl @@ -20,7 +20,7 @@
      - +
      " /> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tmpl index f51fa2cdb5..1c6bbe2483 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tmpl @@ -20,7 +20,7 @@
      - +

      Password Updated

      diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl index bfbecb2d55..c8bcb03f8d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl @@ -41,7 +41,7 @@ Unable to delete member: insufficient privileges. This patron does not exist. -
      Patron's account has been renewed until
      +
      Patron's account has been renewed until
      " /> " /> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tmpl index 843ab66b62..5105fd87fe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tmpl @@ -20,7 +20,7 @@
      - +
      diff --git a/koha-tmpl/intranet-tmpl/prog/img/item-bullet.gif b/koha-tmpl/intranet-tmpl/prog/img/item-bullet.gif new file mode 100644 index 0000000000000000000000000000000000000000..eae920d001a46880af09818892e18bfe8e872e2e GIT binary patch literal 59 zcmZ?wbhEHbWMyDyn8?KN|Ns9vhhG6n1_lPjpDc_F3``6param("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"); + } } -- 2.39.5