[Patches] [PATCH] Bug 7324: Show alternate email as mailto: / hide labels when
koha-patchbot at kohaaloha.com
koha-patchbot at kohaaloha.com
Wed Dec 7 06:55:02 NZDT 2011
From: Katrin Fischer <Katrin.Fischer.83 at web.de>
Date: Tue, 6 Dec 2011 18:45:33 +0100
Subject: [PATCH] Bug 7324: Show alternate email as mailto: / hide labels when
field is empty
Changes made to the patron detail tab:
- alternate email shows as mailto: link
- labels for following fields only show when field is filled
- initials
- date of birth
- gender
- country (alternate address)
- email (alternate address)
- state (alternative contact)
- country (alternative contact)
- phone (alternative contact)
To test:
1) Add new patron with minimal data and check the labels don't show
2) Change patron to have data in changed fields and check labels show
3) Check all email addresses are shown as mailto: links now
---
.../prog/en/modules/members/moremember.tt | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
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 454032c..68a4de9 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
@@ -215,11 +215,11 @@ function validate1(date) {
[% IF ( email ) %]<li><span class="label">Primary email:</span><a href="mailto:[% email %]">[% email %]</a></li>[% END %]
[% IF ( emailpro ) %]<li><span class="label">Secondary email: </span><a href="mailto:[% emailpro %]">[% emailpro %]</a></li>[% END %]
[% END %]
- <li><span class="label">Initials: </span>[% initials %]</li>
- <li><span class="label">Date of birth:</span>[% dateofbirth %]</li>
- <li><span class="label">Gender:</span>
+ [% IF ( initials ) %]<li><span class="label">Initials: </span>[% initials %]</li>[% END %]
+ [% IF ( dateofbirth ) %]<li><span class="label">Date of birth:</span>[% dateofbirth %]</li>[% END %]
+ [% IF ( sex ) %]<li><span class="label">Gender:</span>
[% IF ( sex == 'F' ) %]Female[% ELSIF ( sex == 'M' ) %]Male[% ELSE %][% sex %][% END %]
- </li>[% END %]
+ </li>[% END %][% END %]
[% IF ( printethnicityline ) %]
<li><span class="label">Ethnicity:</span>[% ethnicity %]</li>
<li><span class="label">Ethnicity notes: </span>[% ethnotes %]</li>
@@ -369,9 +369,9 @@ function validate1(date) {
<li><span class="label">City: </span>[% B_city %]</li>
[% IF ( B_state ) %]<li><span class="label">State: </span>[% B_state %]</li>[% END %]
<li><span class="label">Zip/Postal Code: </span>[% B_zipcode %]</li>
- <li><span class="label">Country: </span>[% B_country %]</li>
+ [% IF ( B_country ) %]<li><span class="label">Country: </span>[% B_country %]</li>[% END %]
[% IF ( B_phone ) %]<li><span class="label">Phone: </span>[% B_phone %]</li>[% END %]
- [% IF ( B_email ) %]<li><span class="label">Email: </span>[% B_email %]</li>[% END %]</ol></div>
+ [% IF ( B_email ) %]<li><span class="label">Email: </span><a href="mailto:[% B_email %]">[% email %]</a></li>[% END %]</ol></div>
</div>
<div class="action"><a href="memberentry.pl?op=modify&borrowernumber=[% borrowernumber %]&step=6">Edit</a></div>
[% END %]
@@ -383,10 +383,10 @@ function validate1(date) {
<li><span class="label">Address: </span>[% altcontactaddress1 %]</li>
<li><span class="label">Address 2: </span>[% altcontactaddress2 %]</li>
<li><span class="label">City: </span>[% altcontactaddress3 %]</li>
- [% IF ( altcontactstate ) %]<li><span class="label">State: </span>[% altcontactstate %]</li>[% END %]
+ [% IF ( altcontactstate ) %]<li><span class="label">State: </span>[% altcontactstate %]</li>[% END %]
<li><span class="label">Zip/Postal Code: </span>[% altcontactzipcode %]</li>
- <li><span class="label">Country: </span>[% altcontactcountry %]</li>
- <li><span class="label">Phone: </span>[% altcontactphone %]</li></ol></div>
+ [% IF ( altcontactcountry ) %]<li><span class="label">Country: </span>[% altcontactcountry %]</li>[% END %]
+ [% IF ( altcontactphone ) %]<li><span class="label">Phone: </span>[% altcontactphone %]</li></ol></div>[% END %]
</div>
<div class="action"><a href="memberentry.pl?op=modify&borrowernumber=[% borrowernumber %]&step=2">Edit</a></div>
--
1.7.5.4
More information about the Patches
mailing list