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>
(cherry picked from commit 756a9311a1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Lucas Gass 2023-11-17 21:39:02 +00:00 committed by Fridolin Somers
parent 6529a62e1a
commit 7011b3bc84
1 changed files with 7 additions and 5 deletions

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 %]