Bug 7324: Show alternate email as mailto: / hide labels when field is empty
UPDATE 2011-12-15
Fixed wrong div that broke the patron account display.
Thank you Paul for catching this!
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
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Verified tests 1-3, looks good to me.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
(cherry picked from commit 52dca0f433)
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
This commit is contained in:
parent
9ed382a203
commit
7a14823fa3
|
|
@ -216,11 +216,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>
|
||||
|
|
@ -370,9 +370,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 %]
|
||||
|
|
@ -384,10 +384,11 @@ 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>[% END %]
|
||||
</ol></div>
|
||||
</div>
|
||||
<div class="action"><a href="memberentry.pl?op=modify&borrowernumber=[% borrowernumber %]&step=2">Edit</a></div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue