Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to fix some form notices on Contact Edit form new contact #26481

Merged
merged 1 commit into from
Jun 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 38 additions & 38 deletions templates/CRM/Contact/Form/Edit/CommunicationPreferences.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,28 @@
</div><!-- /.crm-accordion-header -->
<div id="commPrefs" class="crm-accordion-body">
<table class="form-layout-compressed" >
{if !empty($form.communication_style_id)}
<tr><td colspan='4'>
<span class="label">{$form.communication_style_id.label} {help id="id-communication_style" file="CRM/Contact/Form/Contact.hlp"}</span>
<span class="value">{$form.communication_style_id.html}</span>
</td><tr>
{if array_key_exists('communication_style_id', $form)}
<tr><td colspan='4'>
<span class="label">{$form.communication_style_id.label} {help id="id-communication_style" file="CRM/Contact/Form/Contact.hlp"}</span>
<span class="value">{$form.communication_style_id.html}</span>
</td><tr>
{/if}
<tr>
{if !empty($form.email_greeting_id)}
<td>{$form.email_greeting_id.label}</td>
{/if}
{if !empty($form.postal_greeting_id)}
<td>{$form.postal_greeting_id.label}</td>
{/if}
{if !empty($form.addressee_id)}
<td>{$form.addressee_id.label}</td>
{/if}
{if !empty($form.email_greeting_id) OR !empty($form.postal_greeting_id) OR !empty($form.addressee_id)}
<td>&nbsp;&nbsp;{help id="id-greeting" file="CRM/Contact/Form/Contact.hlp"}</td>
{/if}
{if array_key_exists('email_greeting_id', $form)}
<td>{$form.email_greeting_id.label}</td>
{/if}
{if array_key_exists('postal_greeting_id', $form)}
<td>{$form.postal_greeting_id.label}</td>
{/if}
{if array_key_exists('addressee_id', $form)}
<td>{$form.addressee_id.label}</td>
{/if}
{if array_key_exists('email_greeting_id', $form) OR array_key_exists('postal_greeting_id', $form) OR array_key_exists('addressee_id', $form)}
<td>&nbsp;&nbsp;{help id="id-greeting" file="CRM/Contact/Form/Contact.hlp"}</td>
{/if}
</tr>
<tr>
{if !empty($form.email_greeting_id)}
{if array_key_exists('email_greeting_id', $form)}
<td>
<span id="email_greeting" {if !empty($email_greeting_display) and $action eq 2} class="hiddenElement"{/if}>{$form.email_greeting_id.html|crmAddClass:big}</span>
{if !empty($email_greeting_display) and $action eq 2}
Expand All @@ -47,7 +47,7 @@
{/if}
</td>
{/if}
{if !empty($form.postal_greeting_id)}
{if array_key_exists('postal_greeting_id', $form)}
<td>
<span id="postal_greeting" {if !empty($postal_greeting_display) and $action eq 2} class="hiddenElement"{/if}>{$form.postal_greeting_id.html|crmAddClass:big}</span>
{if !empty($postal_greeting_display) and $action eq 2}
Expand All @@ -57,7 +57,7 @@
{/if}
</td>
{/if}
{if !empty($form.addressee_id)}
{if array_key_exists('addressee_id', $form)}
<td>
<span id="addressee" {if !empty($addressee_display) and $action eq 2} class="hiddenElement"{/if}>{$form.addressee_id.html|crmAddClass:big}</span>
{if !empty($addressee_display) and $action eq 2}
Expand All @@ -69,26 +69,26 @@
{/if}
</tr>
<tr id="greetings1" class="hiddenElement">
{if !empty($form.email_greeting_custom)}
<td><span id="email_greeting_id_label" class="hiddenElement">{$form.email_greeting_custom.label}</span></td>
{/if}
{if !empty($form.postal_greeting_custom)}
<td><span id="postal_greeting_id_label" class="hiddenElement">{$form.postal_greeting_custom.label}</span></td>
{/if}
{if !empty($form.addressee_custom)}
<td><span id="addressee_id_label" class="hiddenElement">{$form.addressee_custom.label}</span></td>
{/if}
{if array_key_exists('email_greeting_custom', $form)}
<td><span id="email_greeting_id_label" class="hiddenElement">{$form.email_greeting_custom.label}</span></td>
{/if}
{if array_key_exists('postal_greeting_custom', $form)}
<td><span id="postal_greeting_id_label" class="hiddenElement">{$form.postal_greeting_custom.label}</span></td>
{/if}
{if array_key_exists('addressee_custom', $form)}
<td><span id="addressee_id_label" class="hiddenElement">{$form.addressee_custom.label}</span></td>
{/if}
</tr>
<tr id="greetings2" class="hiddenElement">
{if !empty($form.email_greeting_custom)}
<td><span id="email_greeting_id_html" class="hiddenElement">{$form.email_greeting_custom.html|crmAddClass:big}</span></td>
{/if}
{if !empty($form.postal_greeting_custom)}
<td><span id="postal_greeting_id_html" class="hiddenElement">{$form.postal_greeting_custom.html|crmAddClass:big}</span></td>
{/if}
{if !empty($form.addressee_custom)}
<td><span id="addressee_id_html" class="hiddenElement">{$form.addressee_custom.html|crmAddClass:big}</span></td>
{/if}
{if array_key_exists('email_greeting_custom', $form)}
<td><span id="email_greeting_id_html" class="hiddenElement">{$form.email_greeting_custom.html|crmAddClass:big}</span></td>
{/if}
{if array_key_exists('postal_greeting_custom', $form)}
<td><span id="postal_greeting_id_html" class="hiddenElement">{$form.postal_greeting_custom.html|crmAddClass:big}</span></td>
{/if}
{if array_key_exists('addressee_custom', $form)}
<td><span id="addressee_id_html" class="hiddenElement">{$form.addressee_custom.html|crmAddClass:big}</span></td>
{/if}
</tr>
<tr>
{foreach key=key item=item from=$commPreference}
Expand Down