Bugzilla – Attachment 45581 Details for
Bug 15206
Show patron's age when filling date of birth in memberentry.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15206 - Show patron's age in moremenber page near date of birth
Bug-15206---Show-patrons-age-in-moremenber-page-ne.patch (text/plain), 2.03 KB, created by
Alex Arnaud
on 2015-12-10 16:01:57 UTC
(
hide
)
Description:
Bug 15206 - Show patron's age in moremenber page near date of birth
Filename:
MIME Type:
Creator:
Alex Arnaud
Created:
2015-12-10 16:01:57 UTC
Size:
2.03 KB
patch
obsolete
>From bbeeb6d0157bd3c21d4d2f2c525b0c18fb9f754e Mon Sep 17 00:00:00 2001 >From: Alex Arnaud <alex.arnaud@biblibre.com> >Date: Thu, 10 Dec 2015 17:00:54 +0100 >Subject: [PATCH] Bug 15206 - Show patron's age in moremenber page near date > of birth > >--- > koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt | 2 +- > members/moremember.pl | 6 ++++++ > 2 files changed, 7 insertions(+), 1 deletion(-) > >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 97e547d..1eca2d7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -225,7 +225,7 @@ function validate1(date) { > [% IF ( emailpro ) %]<li><span class="label">Secondary email: </span><a href="mailto:[% emailpro %]">[% emailpro %]</a></li>[% END %] > [% END %] > [% IF ( initials ) %]<li><span class="label">Initials: </span>[% initials %]</li>[% END %] >- [% IF ( dateofbirth ) %]<li><span class="label">Date of birth:</span>[% dateofbirth | $KohaDates %]</li>[% END %] >+ [% IF ( dateofbirth ) %]<li><span class="label">Date of birth:</span>[% dateofbirth | $KohaDates %] ([% age %])</li>[% END %] > [% IF ( sex ) %]<li><span class="label">Gender:</span> > [% IF ( sex == 'F' ) %]Female[% ELSIF ( sex == 'M' ) %]Male[% ELSE %][% sex %][% END %] > </li>[% END %][% END %] >diff --git a/members/moremember.pl b/members/moremember.pl >index 688215b..9066993 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -139,6 +139,12 @@ foreach (qw(dateenrolled dateexpiry dateofbirth)) { > } > $data->{'IS_ADULT'} = ( $data->{'categorycode'} ne 'I' ); > >+my @age; >+my ($years, $months) = GetAge($data->{dateofbirth}); >+push @age, "$years year(s)" if $years; >+push @age, "$months month(s)" if $months; >+$template->param( age => join(', ', @age) ); >+ > for (qw(gonenoaddress lost borrowernotes)) { > $data->{$_} and $template->param(flagged => 1) and last; > } >-- >1.7.10.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 15206
:
44953
|
44978
|
45579
|
45580
|
45581
|
45589
|
45590
|
45591
|
45592
|
45593
|
45597
|
45598
|
45599
|
45600
|
45601
|
46228
|
46245
|
46396
|
47301
|
47505
|
47506
|
47540
|
47541
|
47542
|
49032
|
49033
|
49034