From: Mathieu Lutfy Date: Thu, 11 Apr 2013 14:40:10 +0000 (-0400) Subject: Make it possible to hide the pref mail format in a buildForm hook (in the 'Page'... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a304f73d22e4470d35ecd71dfa8ec98621bb41c0;p=civicrm-core.git Make it possible to hide the pref mail format in a buildForm hook (in the 'Page' tpl, we can hide it using CSS). --- 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)}