Bugzilla – Attachment 56976 Details for
Bug 17492
Show warning if patron's age is out of category limits
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17492: Removed extra IFs
Bug-17492-Removed-extra-IFs.patch (text/plain), 3.78 KB, created by
Radek Šiman (R-Bit Technology, s.r.o.)
on 2016-10-30 14:42:21 UTC
(
hide
)
Description:
Bug 17492: Removed extra IFs
Filename:
MIME Type:
Creator:
Radek Šiman (R-Bit Technology, s.r.o.)
Created:
2016-10-30 14:42:21 UTC
Size:
3.78 KB
patch
obsolete
>From 9398fbe8104d2e2250cfc37d0151923db5e9642b Mon Sep 17 00:00:00 2001 >From: radiuscz <radek.siman@centrum.cz> >Date: Sat, 29 Oct 2016 03:24:39 +0200 >Subject: [PATCH] Bug 17492: Removed extra IFs > >This patch removes unnecessary "if" conditions from html template files. >Removed 'flagged' template parameter in circ/circulation.pl. > >Test plan: >1) Apply patch >2) Create a patron and assign him a category having age limits set >3) Change patron's age to be older/younger than category's limits >4) At "Check out" and "Details" tabs you should see a warning with a >button allowing to change the category, eg.: > - http://prntscr.com/cz7ch3 > - http://prntscr.com/cz7em4 > - http://prntscr.com/cz7dj1 >5) Set a valid category according to patron's age >6) Warning should disappear >7) Perform similar test again, but instead of changing the age change >the limits of a category >8) During tests verify "Change category" button everytime opens "Modify >patron" page: > http://prntscr.com/cz7g5q >--- > circ/circulation.pl | 1 - > .../prog/en/includes/category-out-of-age-limit.inc | 2 -- > .../intranet-tmpl/prog/en/modules/circ/circulation.tt | 17 ++++++++--------- > 3 files changed, 8 insertions(+), 12 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 6399d42..6cd2f0c 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -317,7 +317,6 @@ if ($borrowernumber) { > my $borrowercategory = Koha::Patron::Categories->find($borrower->{ 'categorycode' }); > my ($low,$high) = ($borrowercategory->dateofbirthrequired, $borrowercategory->upperagelimit); > if (($high && ($age > $high)) or ($age < $low)) { >- $template->param( flagged => 1 ); > $template->param( age_limitations => 1 ); > $template->param( age_low => $low ); > $template->param( age_high => $high ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/category-out-of-age-limit.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/category-out-of-age-limit.inc >index 825e8b7..982df7b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/category-out-of-age-limit.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/category-out-of-age-limit.inc >@@ -1,6 +1,4 @@ >-[% IF age_limitations %] > <li> > <span class="circ-hlt">Patron's age is incorrect for their category.</span> > Ages allowed are [% age_low %]-[% age_high %]. > <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&borrowernumber=[% borrowernumber %]&step=3" class="btn btn-mini">Change category</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 ac8ede3..2ff191f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -790,15 +790,14 @@ No patron matched <span class="ex">[% message | html %]</span> > [% IF ( odues ) %]<li>[% IF ( nonreturns ) %]<span class="circ-hlt">Overdues: Patron has ITEMS OVERDUE.</span> <a href="#checkouts">See highlighted items below</a>[% END %]</li> > [% END %] > >- [% IF ( charges || age_limitations ) %] >- [% IF charges %] >- [% INCLUDE 'blocked-fines.inc' >- fines = chargesamount >- %] >- [% END %] >- [% IF age_limitations %] >- [% INCLUDE 'category-out-of-age-limit.inc' %] >- [% END %] >+ [% IF charges %] >+ [% INCLUDE 'blocked-fines.inc' >+ fines = chargesamount >+ %] >+ [% END %] >+ >+ [% IF age_limitations %] >+ [% INCLUDE 'category-out-of-age-limit.inc' %] > [% END %] > > [% IF ( charges_guarantees ) %] >-- >2.1.4
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 17492
:
56805
|
56806
|
56874
|
56933
|
56934
|
56935
|
56936
|
56937
|
56976
|
56985
|
56986
|
56987
|
56988
|
56989
|
56990
|
56995
|
62860
|
67040
|
67041
|
67042
|
67850
|
67851
|
67867
|
67868
|
68139
|
68140
|
68141
|
68142
|
68143
|
68144
|
68145
|
91028
|
91029
|
91044
|
91045
|
91098
|
91099
|
91100