Bugzilla – Attachment 17066 Details for
Bug 9406
no confirmation displayed after renewing a patron from details page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 9406: ensure confirmation of patron renewal is displayed
PASSED-QA-Bug-9406-ensure-confirmation-of-patron-r.patch (text/plain), 8.39 KB, created by
Katrin Fischer
on 2013-03-30 22:59:06 UTC
(
hide
)
Description:
[PASSED QA] Bug 9406: ensure confirmation of patron renewal is displayed
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2013-03-30 22:59:06 UTC
Size:
8.39 KB
patch
obsolete
>From ef11b5622ffdbacc305497a8cab2431540b2110b Mon Sep 17 00:00:00 2001 >From: Galen Charlton <gmc@esilibrary.com> >Date: Wed, 16 Jan 2013 09:38:28 -0800 >Subject: [PATCH] [PASSED QA] Bug 9406: ensure confirmation of patron renewal > is displayed > >When renewing a patron from the patron details page, ensure that >the "Patron's account has been renewed until XXX" is actually >displayed. > >This patch introduces a was_renewed CGI and template parameter >to clarify the intent of the relevent template sections. > >To test: > >- Before applying the patch, renew a patron from the patron > details page and verify that you don't see the renewal confirmation. >- After applying the patch, renew the patron from the details page > and verify that the "Patron's account has been renewed until XXX" > message shows up. >- Renew the patron from the checkout page and verify that the confirmation > message shows up. > >Signed-off-by: Galen Charlton <gmc@esilibrary.com> >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Message now displays for both tabs. >Fixed tab to make QA script pass. >--- > circ/circulation.pl | 3 +-- > .../prog/en/includes/members-toolbar.inc | 2 +- > .../prog/en/modules/circ/circulation.tt | 2 +- > .../prog/en/modules/members/moremember-brief.tt | 2 +- > .../prog/en/modules/members/moremember.tt | 4 ++-- > members/moremember.pl | 8 +------- > members/setstatus.pl | 4 ++-- > 7 files changed, 9 insertions(+), 16 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index f8a11c4..7ca62f2 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -132,7 +132,6 @@ my $issueconfirmed = $query->param('issueconfirmed'); > my $cancelreserve = $query->param('cancelreserve'); > my $organisation = $query->param('organisations'); > my $print = $query->param('print') || q{}; >-my $newexpiry = $query->param('dateexpiry'); > my $debt_confirmed = $query->param('debt_confirmed') || 0; # Don't show the debt error dialog twice > my $charges = $query->param('charges') || q{}; > >@@ -682,7 +681,7 @@ $template->param( > surname => $borrower->{'surname'}, > showname => $borrower->{'showname'}, > category_type => $borrower->{'category_type'}, >- dateexpiry => format_date($newexpiry), >+ was_renewed => $query->param('was_renewed') ? 1 : 0, > expiry => format_date($borrower->{'dateexpiry'}), > categorycode => $borrower->{'categorycode'}, > categoryname => $borrower->{description}, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >index 3bdcec8..787b852 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >@@ -131,7 +131,7 @@ function searchToHold(){ > <button class="btn btn-small dropdown-toggle" data-toggle="dropdown">More <span class="caret"></span></button> > <ul class="dropdown-menu"> > [% IF ( CAN_user_borrowers ) %] >- <li><a id="renewpatron" href="/cgi-bin/koha/members/moremember.pl?reregistration=y&borrowernumber=[% borrowernumber %]">Renew patron</a></li> >+ <li><a id="renewpatron" href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&cardnumber=[% cardnumber %]&destination=[% destination %]&reregistration=y">Renew patron</a></li> > [% ELSE %] > <li class="disabled"><a id="renewpatron" href="#">Renew patron</a></li> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 19b5bd7..82fcdf8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -291,7 +291,7 @@ function validate1(date) { > </form> > </div> > >-[% IF ( dateexpiry ) %]<div class="dialog message">Patron's account has been renewed until [% dateexpiry %]</div>[% END %] >+[% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% expiry %]</div>[% END %] > > [% IF additional_materials %] > <div id="materials" class="dialog message">Note about the accompanying materials: <br /> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt >index d983996..c9fb845 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt >@@ -76,7 +76,7 @@ > <li><span class="label">Category: </span>[% description %] ([% categorycode %])</li> > <li><span class="label">Registration date: </span>[% dateenrolled %]</li> > <li><span class="label">Expiration date: </span> >- [% IF ( reregistration ) %] >+ [% IF ( was_renewed ) %] > <strong class="reregistrinfo">[% dateexpiry %]</strong> > [% ELSE %] > [% dateexpiry %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >index 868334f..b3eef3a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -181,7 +181,7 @@ function validate1(date) { > [% IF ( unknowuser ) %] > <div class="dialog message">This patron does not exist.</div> > [% ELSE %] >- [% IF ( reregistration ) %]<div class="dialog message">Patron's account has been renewed until [% dateexpiry %]</div>[% END %] >+ [% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% dateexpiry %]</div>[% END %] > > [% IF ( flagged ) %] > <div id="circmessages" class="circmessage attention"> >@@ -358,7 +358,7 @@ function validate1(date) { > <li><span class="label">Registration date: </span>[% dateenrolled %]</li> > > <li><span class="label">Expiration date: </span> >- [% IF ( reregistration ) %] >+ [% IF ( was_renewed ) %] > <strong class="reregistrinfo">[% dateexpiry %]</strong> > [% ELSE %] > [% dateexpiry %] >diff --git a/members/moremember.pl b/members/moremember.pl >index fe3b2eb..e6f80dd 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -118,7 +118,6 @@ my $borrowernumber = $input->param('borrowernumber'); > > #start the page and read in includes > my $data = GetMember( 'borrowernumber' => $borrowernumber ); >-my $reregistration = $input->param('reregistration'); > > if ( not defined $data ) { > $template->param (unknowuser => 1); >@@ -126,11 +125,6 @@ if ( not defined $data ) { > exit; > } > >-# re-reregistration function to automatic calcul of date expiry >-if ( $reregistration eq 'y' ) { >- $data->{'dateexpiry'} = ExtendMemberSubscriptionTo( $borrowernumber ); >-} >- > my $category_type = $data->{'category_type'}; > > ### $category_type >@@ -412,7 +406,7 @@ $template->param( > borrowernumber => $borrowernumber, > othernames => $data->{'othernames'}, > categoryname => $data->{'description'}, >- reregistration => $reregistration, >+ was_renewed => $input->param('was_renewed') ? 1 : 0, > branch => $branch, > todaysdate => C4::Dates->today(), > totalprice => sprintf("%.2f", $totalprice), >diff --git a/members/setstatus.pl b/members/setstatus.pl >index 914c36e..3fb12c2 100755 >--- a/members/setstatus.pl >+++ b/members/setstatus.pl >@@ -58,13 +58,13 @@ if ( $reregistration eq 'y' ) { > > if($destination eq "circ"){ > if($dateexpiry){ >- print $input->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=$cardnumber&dateexpiry=$dateexpiry"); >+ print $input->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=$cardnumber&was_renewed=1"); > } else { > print $input->redirect("/cgi-bin/koha/circ/circulation.pl?findborrower=$cardnumber"); > } > } else { > if($dateexpiry){ >- print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$borrowernumber&dateexpiry=$dateexpiry"); >+ print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$borrowernumber&was_renewed=1"); > } else { > print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$borrowernumber"); > } >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9406
:
14630
|
14665
|
16216
| 17066