}
$template = CRM_Core_Smarty::singleton();
+ $template->ensureVariablesAreAssigned(['elemType']);
$template->assign_by_ref('hideBlocks', $hide);
$template->assign_by_ref('showBlocks', $show);
}
*}
{* This included tpl hides and displays the appropriate blocks as directed by the php code which assigns showBlocks and hideBlocks arrays. *}
<script type="text/javascript">
- var showBlocks = new Array({$showBlocks});
- var hideBlocks = new Array({$hideBlocks});
+ var showBlocks = new Array({$showBlocks|smarty:nodefaults});
+ var hideBlocks = new Array({$hideBlocks|smarty:nodefaults});
- on_load_init_blocks( showBlocks, hideBlocks{if !empty($elemType) and $elemType EQ 'table-row'}, 'table-row'{/if} );
+ on_load_init_blocks( showBlocks, hideBlocks{if $elemType and $elemType EQ 'table-row'}, 'table-row'{/if} );
</script>