From 4b3006270ce372d71f189583b5fa0518c38a15e3 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 9 Jun 2023 10:38:21 +1200 Subject: [PATCH] Fix some form notices on Contact Edit form new contact --- .../Form/Edit/CommunicationPreferences.tpl | 76 +++++++++---------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/templates/CRM/Contact/Form/Edit/CommunicationPreferences.tpl b/templates/CRM/Contact/Form/Edit/CommunicationPreferences.tpl index 21099dd319..5b469501c8 100644 --- a/templates/CRM/Contact/Form/Edit/CommunicationPreferences.tpl +++ b/templates/CRM/Contact/Form/Edit/CommunicationPreferences.tpl @@ -16,28 +16,28 @@
- {if !empty($form.communication_style_id)} - + {if array_key_exists('communication_style_id', $form)} + {/if} - {if !empty($form.email_greeting_id)} - - {/if} - {if !empty($form.postal_greeting_id)} - - {/if} - {if !empty($form.addressee_id)} - - {/if} - {if !empty($form.email_greeting_id) OR !empty($form.postal_greeting_id) OR !empty($form.addressee_id)} - - {/if} + {if array_key_exists('email_greeting_id', $form)} + + {/if} + {if array_key_exists('postal_greeting_id', $form)} + + {/if} + {if array_key_exists('addressee_id', $form)} + + {/if} + {if array_key_exists('email_greeting_id', $form) OR array_key_exists('postal_greeting_id', $form) OR array_key_exists('addressee_id', $form)} + + {/if} - {if !empty($form.email_greeting_id)} + {if array_key_exists('email_greeting_id', $form)} {/if} - {if !empty($form.postal_greeting_id)} + {if array_key_exists('postal_greeting_id', $form)} {/if} - {if !empty($form.addressee_id)} + {if array_key_exists('addressee_id', $form)} - {if !empty($form.email_greeting_custom)} - - {/if} - {if !empty($form.postal_greeting_custom)} - - {/if} - {if !empty($form.addressee_custom)} - - {/if} + {if array_key_exists('email_greeting_custom', $form)} + + {/if} + {if array_key_exists('postal_greeting_custom', $form)} + + {/if} + {if array_key_exists('addressee_custom', $form)} + + {/if} - {if !empty($form.email_greeting_custom)} - - {/if} - {if !empty($form.postal_greeting_custom)} - - {/if} - {if !empty($form.addressee_custom)} - - {/if} + {if array_key_exists('email_greeting_custom', $form)} + + {/if} + {if array_key_exists('postal_greeting_custom', $form)} + + {/if} + {if array_key_exists('addressee_custom', $form)} + + {/if} {foreach key=key item=item from=$commPreference} -- 2.25.1
- {$form.communication_style_id.label} {help id="id-communication_style" file="CRM/Contact/Form/Contact.hlp"} - {$form.communication_style_id.html} -
+ {$form.communication_style_id.label} {help id="id-communication_style" file="CRM/Contact/Form/Contact.hlp"} + {$form.communication_style_id.html} +
{$form.email_greeting_id.label}{$form.postal_greeting_id.label}{$form.addressee_id.label}  {help id="id-greeting" file="CRM/Contact/Form/Contact.hlp"}{$form.email_greeting_id.label}{$form.postal_greeting_id.label}{$form.addressee_id.label}  {help id="id-greeting" file="CRM/Contact/Form/Contact.hlp"}
{$form.email_greeting_id.html|crmAddClass:big} {if !empty($email_greeting_display) and $action eq 2} @@ -47,7 +47,7 @@ {/if} {$form.postal_greeting_id.html|crmAddClass:big} {if !empty($postal_greeting_display) and $action eq 2} @@ -57,7 +57,7 @@ {/if} {$form.addressee_id.html|crmAddClass:big} {if !empty($addressee_display) and $action eq 2} @@ -69,26 +69,26 @@ {/if}
{$form.email_greeting_custom.label}{$form.postal_greeting_custom.label}{$form.addressee_custom.label}{$form.email_greeting_custom.label}{$form.postal_greeting_custom.label}{$form.addressee_custom.label}
{$form.email_greeting_custom.html|crmAddClass:big}{$form.postal_greeting_custom.html|crmAddClass:big}{$form.addressee_custom.html|crmAddClass:big}{$form.email_greeting_custom.html|crmAddClass:big}{$form.postal_greeting_custom.html|crmAddClass:big}{$form.addressee_custom.html|crmAddClass:big}