Bug 35356: Show SMS labels only when data exists

To test:
APPLY PATCH
1. Set SMSSendDriver = Email
2. Admin > SMS cellular providers, have at least 1.
3. Go to the members/moremember.pl
4. If the patron has no SMSnumber or SMS provider then niether of the labels should appear.
5. Add both a SMSnumber and SMS provider, make sure the data appears correctly on members/moremember.pl.

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Lucas Gass 2023-11-17 21:39:02 +00:00 committed by Katrin Fischer
parent 78d1093cb5
commit 756a9311a1
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -354,11 +354,13 @@
[% IF Koha.Preference('SMSSendDriver') %]
<div class="rows">
<ol>
<li>
<span class="label">SMS number:</span>
<a href="sms:[% patron.smsalertnumber | uri %]">[% patron.smsalertnumber | html %]</a>
</li>
[% IF Koha.Preference( 'SMSSendDriver') == 'Email' %]
[% IF patron.smsalertnumber %]
<li>
<span class="label">SMS number:</span>
<a href="sms:[% patron.smsalertnumber | uri %]">[% patron.smsalertnumber | html %]</a>
</li>
[% END %]
[% IF Koha.Preference( 'SMSSendDriver') == 'Email' && patron.sms_provider.name %]
<li>
<span class="label">SMS provider:</span>
[% patron.sms_provider.name | html %]