From 1499bc40c4f86206891c33b2b773ac4d47906eff Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 7 Apr 2023 11:56:03 +1200 Subject: [PATCH] Remove traces of preferred mail format from communication preferences --- CRM/Contact/Form/Edit/CommunicationPreferences.php | 8 -------- CRM/Contact/Form/Inline/CommunicationPreferences.php | 3 --- .../Contact/Form/Inline/CommunicationPreferences.tpl | 12 ------------ 3 files changed, 23 deletions(-) diff --git a/CRM/Contact/Form/Edit/CommunicationPreferences.php b/CRM/Contact/Form/Edit/CommunicationPreferences.php index 1252d35c3e..5cd315f4a2 100644 --- a/CRM/Contact/Form/Edit/CommunicationPreferences.php +++ b/CRM/Contact/Form/Edit/CommunicationPreferences.php @@ -172,14 +172,6 @@ class CRM_Contact_Form_Edit_CommunicationPreferences { $defaults['communication_style_id'] = array_pop(CRM_Core_OptionGroup::values('communication_style', TRUE, NULL, NULL, 'AND is_default = 1')); } - // CRM-17778 -- set preferred_mail_format to default if unset - if (empty($defaults['preferred_mail_format'])) { - $defaults['preferred_mail_format'] = 'Both'; - } - else { - $defaults['preferred_mail_format'] = array_search($defaults['preferred_mail_format'], CRM_Core_SelectValues::pmf()); - } - //set default from greeting types CRM-4575, CRM-9739 if ($form->_action & CRM_Core_Action::ADD) { foreach (CRM_Contact_BAO_Contact::$_greetingTypes as $greeting) { diff --git a/CRM/Contact/Form/Inline/CommunicationPreferences.php b/CRM/Contact/Form/Inline/CommunicationPreferences.php index 5ca94df5dd..6452b0b02e 100644 --- a/CRM/Contact/Form/Inline/CommunicationPreferences.php +++ b/CRM/Contact/Form/Inline/CommunicationPreferences.php @@ -44,9 +44,6 @@ class CRM_Contact_Form_Inline_CommunicationPreferences extends CRM_Contact_Form_ // CRM-19135: where CRM_Core_BAO_Contact::getValues() set label as a default value instead of reserved 'value', // the code is to ensure we always set default to value instead of label - if (!empty($defaults['preferred_mail_format'])) { - $defaults['preferred_mail_format'] = array_search($defaults['preferred_mail_format'], CRM_Core_SelectValues::pmf()); - } if (empty($defaults['communication_style_id'])) { $defaults['communication_style_id'] = array_pop(CRM_Core_OptionGroup::values('communication_style', TRUE, NULL, NULL, 'AND is_default = 1')); diff --git a/templates/CRM/Contact/Form/Inline/CommunicationPreferences.tpl b/templates/CRM/Contact/Form/Inline/CommunicationPreferences.tpl index eda461fe0d..26544de0ee 100644 --- a/templates/CRM/Contact/Form/Inline/CommunicationPreferences.tpl +++ b/templates/CRM/Contact/Form/Inline/CommunicationPreferences.tpl @@ -45,18 +45,6 @@ - {if !empty($form.preferred_mail_format)} -
-
- {$form.preferred_mail_format.label} - {help id="id-emailFormat" file="CRM/Contact/Form/Contact.hlp"} -
-
- {$form.preferred_mail_format.html} -
-
- {/if} - {if !empty($form.communication_style_id)}
-- 2.25.1