| and copyright information, see https://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
-{if $fieldSpec.template}
+{if !empty($fieldSpec.template)}
{include file=$fieldSpec.template}
{else}
<td class="label">{$form.$fieldName.label}
- {if $fieldSpec.help}{assign var=help value=$fieldSpec.help}{capture assign=helpFile}{if $fieldSpec.help}
+ {if !empty($fieldSpec.help)}{assign var=help value=$fieldSpec.help}{capture assign=helpFile}{if $fieldSpec.help}
{$fieldSpec.help}
{else}''{/if}
{/capture}{help id=$help.id file=$help.file}{/if}
{if $action == 2 && $fieldSpec.is_add_translate_dialog}{include file='CRM/Core/I18n/Dialog.tpl' table=$entityTable field=$fieldName id=$entityID}{/if}
</td>
- <td>{$fieldSpec.pre_html_text}{if $form.$fieldName.html}{$form.$fieldName.html}{else}{$fieldSpec.place_holder}{/if}{$fieldSpec.post_html_text}<br />
- {if $fieldSpec.description}<span class="description">{$fieldSpec.description}</span>{/if}
- {if $fieldSpec.documentation_link}{docURL page=$fieldSpec.documentation_link.page resource=$fieldSpec.documentation_link.resource}{/if}
+ <td>{if !empty($fieldSpec.pre_html_text)}{$fieldSpec.pre_html_text}{/if}{if $form.$fieldName.html}{$form.$fieldName.html}{else}{$fieldSpec.place_holder}{/if}{if !empty($fieldSpec.post_html_text)}{$fieldSpec.post_html_text}{/if}<br />
+ {if !empty($fieldSpec.description)}<span class="description">{$fieldSpec.description}</span>{/if}
+ {if !empty($fieldSpec.documentation_link)}{docURL page=$fieldSpec.documentation_link.page resource=$fieldSpec.documentation_link.resource}{/if}
</td>
{/if}
*}
{* Initialize jQuery validate on a form *}
{* Extra params and functions may be added to the CRM.validate object before this template is loaded *}
-{if !$crm_form_validate_included and $smarty.get.snippet neq 'json' and $form and $form.formClass}
+{if empty($crm_form_validate_included) and !empty($smarty.get.snippet) and $smarty.get.snippet neq 'json' and !empty($form) and !empty($form.formClass)}
{assign var=crm_form_validate_included value=1}
{literal}
<script type="text/javascript">
{if empty($tagsetType)}
{assign var="tagsetType" value="contact"}
{/if}
-{if $tableLayout}
+{if !empty($tableLayout)}
<td colspan="2" class="crm-content-block">
<table>
{/if}
+ {if !empty($tagsetInfo)}
{foreach from=$tagsetInfo.$tagsetType item=tagset}
{assign var="elemName" value=$tagset.tagsetElementName}
{if empty($tagsetElementName) or $tagsetElementName eq $elemName}
{/if}
{/if}
{/foreach}
-{if $tableLayout}
+ {/if}
+{if !empty($tableLayout)}
</table>
</td>
{/if}
-{if !$skipEntityAction and empty($form.frozen)}
+{if empty($skipEntityAction) and empty($form.frozen)}
<script type="text/javascript">
{* Add/remove entity tags via ajax api *}
{literal}
{if count( $wizard.steps ) > 1}
{* wizard.style variable is passed by some Wizards to allow alternate styling for progress "bar". *}
<div id="wizard-steps">
- <ul class="wizard-bar{if $wizard.style.barClass}-{$wizard.style.barClass}{/if}">
+ <ul class="wizard-bar{if !empty($wizard.style.barClass)}-{$wizard.style.barClass}{/if}">
{section name=step loop=$wizard.steps}
{if count ( $wizard.steps ) > 5 }
{* truncate step titles so header isn't too wide *}
{assign var="title" value=$wizard.steps[step].title}
{/if}
{* Show each wizard link unless collapsed value is true. Also excluding quest app submit steps. Should create separate WizardHeader for Quest at some point.*}
- {if !$wizard.steps[step].collapsed && $wizard.steps[step].name NEQ 'Submit' && $wizard.steps[step].name NEQ 'PartnerSubmit'}
+ {if empty($wizard.steps[step].collapsed) && !empty($wizard.steps[step].name) && $wizard.steps[step].name NEQ 'Submit' && $wizard.steps[step].name NEQ 'PartnerSubmit'}
{assign var=i value=$smarty.section.step.iteration}
{if $wizard.currentStepNumber > $wizard.steps[step].stepNumber}
{if $wizard.steps[step].step}
{/section}
</ul>
</div>
-{if $wizard.style.showTitle}
+{if !empty($wizard.style.showTitle)}
<h2>{$wizard.currentStepTitle} {ts 1=$wizard.currentStepNumber 2=$wizard.stepCount}(step %1 of %2){/ts}</h2>
{/if}
{/if}
}
{/literal}
- {if $groupID}
+ {if !empty($groupID)}
dataUrl += '&groupID=' + '{$groupID}';
{/if}
- {if $entityID}
+ {if !empty($entityID)}
dataUrl += '&entityID=' + '{$entityID}';
{/if}
- {if $qfKey}
+ {if !empty($qfKey)}
dataUrl += '&qf=' + '{$qfKey}';
{/if}
- {if $action}
+ {if !empty($action)}
dataUrl += '&action=' + '{$action}';
{/if}
{literal}
-{if $customDataType}
+{if !empty($customDataType)}
<div id="customData"></div>
{*include custom data js file*}
{include file="CRM/common/customData.tpl"}
{foreach from=$form.buttons item=button key=key name=btns}
{if $key|substring:0:4 EQ '_qf_'}
- {if $location}
+ {if !empty($location)}
{$form.buttons.$key.html|crmReplace:id:"$key-$location"}
{else}
{$form.buttons.$key.html}
}
// for date sorting see http://wiki.civicrm.org/confluence/display/CRMDOC/Sorting+Date+Fields+in+dataTables+Widget
- var useAjax = {/literal}{if $useAjax}1{else}0{/if}{literal},
+ var useAjax = {/literal}{if !empty($useAjax)}1{else}0{/if}{literal},
sourceUrl = '',
useClass = 'display',
tcount = 1,
var showBlocks = new Array({$showBlocks});
var hideBlocks = new Array({$hideBlocks});
- on_load_init_blocks( showBlocks, hideBlocks{if $elemType EQ 'table-row'}, 'table-row'{/if} );
+ on_load_init_blocks( showBlocks, hideBlocks{if !empty($elemType) and $elemType EQ 'table-row'}, 'table-row'{/if} );
</script>