From a304f73d22e4470d35ecd71dfa8ec98621bb41c0 Mon Sep 17 00:00:00 2001 From: Mathieu Lutfy Date: Thu, 11 Apr 2013 10:40:10 -0400 Subject: [PATCH] Make it possible to hide the pref mail format in a buildForm hook (in the 'Page' tpl, we can hide it using CSS). --- .../CRM/Contact/Form/Edit/CommunicationPreferences.tpl | 9 +++++---- .../CRM/Contact/Form/Inline/CommunicationPreferences.tpl | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/templates/CRM/Contact/Form/Edit/CommunicationPreferences.tpl b/templates/CRM/Contact/Form/Edit/CommunicationPreferences.tpl index ef2cc45bf0..ecf0c3febf 100644 --- a/templates/CRM/Contact/Form/Edit/CommunicationPreferences.tpl +++ b/templates/CRM/Contact/Form/Edit/CommunicationPreferences.tpl @@ -110,10 +110,11 @@ {$form.is_opt_out.html} {$form.is_opt_out.label} {help id="id-optOut" file="CRM/Contact/Form/Contact.hlp"} - {$form.preferred_mail_format.label}   - {$form.preferred_mail_format.html} {help id="id-emailFormat" file="CRM/Contact/Form/Contact.hlp"} - - + {if !empty($form.preferred_mail_format)} + {$form.preferred_mail_format.label}   + {$form.preferred_mail_format.html} {help id="id-emailFormat" file="CRM/Contact/Form/Contact.hlp"} + + {/if} diff --git a/templates/CRM/Contact/Form/Inline/CommunicationPreferences.tpl b/templates/CRM/Contact/Form/Inline/CommunicationPreferences.tpl index 4c31c6756f..a1efb9cb67 100644 --- a/templates/CRM/Contact/Form/Inline/CommunicationPreferences.tpl +++ b/templates/CRM/Contact/Form/Inline/CommunicationPreferences.tpl @@ -60,6 +60,8 @@ {$form.preferred_language.html} + + {if !empty($form.preferred_mail_format)}
{$form.preferred_mail_format.label} @@ -68,6 +70,7 @@ {$form.preferred_mail_format.html} {help id="id-emailFormat" file="CRM/Contact/Form/Contact.hlp"}
+ {/if} {if !empty($form.email_greeting_id)}
-- 2.25.1