{*add dupe buttons *}
{$form._qf_Contact_refresh_dedupe.html}
- {if $isDuplicate}
+ {if !empty($isDuplicate)}
{$form._qf_Contact_upload_duplicate.html}
{/if}
subTypeValues = null;
}
else if (!subTypeValues) {
- subTypeValues = {/literal}"{$paramSubType}"{literal};
+ subTypeValues = {/literal}{if isset($paramSubType)}"{$paramSubType}"{else}""{/if}{literal};
}
function loadNextRecord(i, groupValue, groupCount) {
if (i < groupCount) {
<div id="Address_Block_{$blockId}" {if $className eq 'CRM_Contact_Form_Contact'} class="boxBlock crm-edit-address-block crm-address_{$blockId}"{/if}>
{if $blockId gt 1}<fieldset><legend>{ts}Supplemental Address{/ts}</legend>{/if}
<table class="form-layout-compressed crm-edit-address-form">
- {if $masterAddress.$blockId gt 0 }
+ {if isset($masterAddress) && $masterAddress.$blockId gt 0 }
<tr><td><div class="message status">{icon icon="fa-info-circle"}{/icon} {ts 1=$masterAddress.$blockId}This address is shared with %1 contact record(s). Modifying this address will automatically update the shared address for these contacts.{/ts}</div></td></tr>
{/if}
{$form.prefix_id.html}
</td>
{/if}
- {if $form.formal_title}
+ {if !empty($form.formal_title)}
<td>
{$form.formal_title.label}<br/>
{$form.formal_title.html}
{$form.last_name.html}
</td>
{/if}
- {if $form.suffix_id}
+ {if !empty($form.suffix_id)}
<td>
{$form.suffix_id.label}<br/>
{$form.suffix_id.html}
<div class="crm-accordion-header">{$title}</div>
<div class="crm-accordion-body" id="tagGroup">
{/if}
- <table class="form-layout-compressed{if $context EQ 'profile'} crm-profile-tagsandgroups{/if}">
+ <table class="form-layout-compressed{if isset($context) && $context EQ 'profile'} crm-profile-tagsandgroups{/if}">
<tr>
- {if !$type || $type eq 'tag'}
+ {if empty($type) || $type eq 'tag'}
<td>
<div class="crm-section tag-section">
- {if $title}{$form.tag.label}<br>{/if}
+ {if !empty($title)}{$form.tag.label}<br>{/if}
{$form.tag.html}
</div>
- {if $context NEQ 'profile'}
+ {if !isset($context) || $context NEQ 'profile'}
{include file="CRM/common/Tagset.tpl"}
{/if}
</td>
{/if}
- {if !$type || $type eq 'group'}
+ {if empty($type) || $type eq 'group'}
<td>
- {if $groupElementType eq 'select'}
+ {if isset($groupElementType) && $groupElementType eq 'select'}
<div class="crm-section group-section">
- {if $title}{$form.group.label}<br>{/if}
+ {if !empty($title)}{$form.group.label}<br>{/if}
{$form.group.html}
</div>
{else}
- {foreach key=key item=item from=$tagGroup.group}
- <div class="group-wrapper">
- {$form.group.$key.html}
- {if $item.description}
- <div class="description">{$item.description}</div>
- {/if}
- </div>
- {/foreach}
+ {if isset($form.group)}
+ {foreach key=key item=item from=$tagGroup.group}
+ <div class="group-wrapper">
+ {$form.group.$key.html}
+ {if $item.description}
+ <div class="description">{$item.description}</div>
+ {/if}
+ </div>
+ {/foreach}
+ {/if}
{/if}
</td>
{/if}
-{if !$isSingleRecordEdit && $cd_edit.is_multiple eq 1 and $cd_edit.table_id and $contactId and !$skipTitle and $cd_edit.style eq 'Inline'}
+{if empty($isSingleRecordEdit) && $cd_edit.is_multiple eq 1 and $cd_edit.table_id and $contactId and !$skipTitle and $cd_edit.style eq 'Inline'}
{assign var=tableID value=$cd_edit.table_id}
<a href="#" class="crm-hover-button crm-custom-value-del" title="{ts 1=$cd_edit.title}Delete %1{/ts}"
data-post='{ldelim}"valueID": "{$tableID}", "groupID": "{$group_id}", "contactId": "{$contactId}", "key": "{crmKey name='civicrm/ajax/customvalue'}"{rdelim}'>
{if $cd_edit.help_pre}
<div class="messages help">{$cd_edit.help_pre}</div>
{/if}
-<table {if !$isSingleRecordEdit}class="form-layout-compressed"{/if}>
+<table {if empty($isSingleRecordEdit)}class="form-layout-compressed"{/if}>
{foreach from=$cd_edit.fields item=element key=field_id}
{if $customDataEntity && $blockId}
{* custom data entity combined with blockId tells us we have an entity with mutliple blocks
</table>
<div class="spacer"></div>
{if $cd_edit.help_post}<div class="messages help">{$cd_edit.help_post}</div>{/if}
-{if !$isSingleRecordEdit && $cd_edit.is_multiple and ( ( $cd_edit.max_multiple eq '' ) or ( $cd_edit.max_multiple > 0 and $cd_edit.max_multiple > $cgCount ) ) }
+{if empty($isSingleRecordEdit) && $cd_edit.is_multiple and ( ( $cd_edit.max_multiple eq '' ) or ( $cd_edit.max_multiple > 0 and $cd_edit.max_multiple > $cgCount ) ) }
{if $skipTitle}
{* We don't yet support adding new records in inline-edit forms *}
<div class="messages help">
{if !empty($pageTitle)}
<div class="crm-title">
- <h1 class="title">{if $isDeleted}<del>{/if}{$pageTitle}{if $isDeleted}</del>{/if}</h1>
+ <h1 class="title">{if !empty($isDeleted)}<del>{/if}{$pageTitle}{if !empty($isDeleted)}</del>{/if}</h1>
</div>
{/if}
<div id="mainTabContainer">
<ul>
{foreach from=$tabHeader key=tabName item=tabValue}
- <li id="tab_{$tabName}" class="crm-tab-button ui-corner-all{if !$tabValue.valid} disabled{/if}{if isset($tabValue.class)} {$tabValue.class}{/if}" {$tabValue.extra}>
+ <li id="tab_{$tabName}" class="crm-tab-button ui-corner-all{if !$tabValue.valid} disabled{/if}{if isset($tabValue.class)} {$tabValue.class}{/if}" {if isset($tabValue.extra)}{$tabValue.extra}{/if}>
{if $tabValue.active}
<a href="{if !empty($tabValue.template)}#panel_{$tabName}{else}{$tabValue.link}{/if}" title="{$tabValue.title|escape}{if !$tabValue.valid} ({ts}disabled{/ts}){/if}">
{if !empty($tabValue.icon)}<i class="{$tabValue.icon}"></i>{/if}
{/foreach}
{/if}
- {if $loadShowHideAddressFields}
+ {if !empty($loadShowHideAddressFields)}
{foreach from=$showHideAddressFields key="blockId" item="fieldName"}
processAddressFields( '{$fieldName}', '{$blockId}', 0 );
{/foreach}