Bug 38138: (bug 33398 follow-up) Don't display code for primary contact method

We have several choices for "primary_contact_method", we don't want to
display the code but the label
phone => Primary phone
phonepro => Secondary phone
mobile => Other phone
email => Primary email
emailpro => Secondary email
fax => Fax

Bonus: it will make it translatable.

Test plan:
1. Edit a patron record to add a Main contact method
2. Place a hold for this patron
3. Check the item in
   --> Pop up says "Main contact method:" followed by the choice.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 49e09672b5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4bd535936d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2024-10-16 10:28:47 +02:00 committed by Fridolin Somers
parent 49540025a2
commit 17fbc68ead
1 changed files with 16 additions and 1 deletions

View File

@ -843,7 +843,22 @@
[% UNLESS ( transfertodo) %]
[% INCLUDE display_bormessagepref %]
[% IF patron.primary_contact_method %]
<li id="main_contact_method">Main contact method: <span>[% patron.primary_contact_method | html %]</span></li>
<li id="main_contact_method">Main contact method:
[% SWITCH patron.primary_contact_method %]
[% CASE 'phone' %]
<span>Primary phone</span>
[% CASE 'phonepro' %]
<span>Secondary phone</span>
[% CASE 'mobile' %]
<span>Other phone</span>
[% CASE 'email' %]
<span>Primary email</span>
[% CASE 'emailpro' %]
<span>Secondary email</span>
[% CASE 'fax' %]
<span>Fax</span>
[% END %]
</li>
[% END %]
[% END %]