{if $section.field.description}
{$section.field.description|escape}
{/if} {block name="before_quickform_table"} {* #03 - Inner elements loop -------------------------- Now we go through each element in this section and render it. *} {foreach from=$elements item=element} {* #04 - Render Element ------------------------------ This section is used to render an element to be displayed. *} {block name="before_`$element.field.name`_row" table=$element.field.tablename} {define_slot name="`$element.field.name`_row" table=$element.field.tablename} {if $element.field.widget.template} {else} {/if} {/define_slot} {block name="after_`$element.field.name`_row" table=$element.field.tablename} {/foreach}
{include file=$element.field.widget.template element=$element}
{if $element.required}   {/if} {if $element.field.display != 'block'}
{/if} {if $element.error}
{$element.error}
{/if} {if $element.field.display == 'block'}{if !$element.frozen}
{$element.field.widget.description}
{else}
{$element.field.widget.frozen_description}
{/if} {/if} {if $element.properties.preview}
{define_slot name="`$element.field.name`_preview_image" src=$element.properties.image_preview} {if $element.properties.image_preview} {$element.field.name} preview image {/if} {/define_slot} {define_slot name="`$element.field.name`_preview_link" src=$element.properties.preview}{translate id="scripts.GLOBAL.MESSAGE_VIEW_FIELD_CONTENT"}View Field Content in new Window{/translate}{/define_slot} {define_slot name="`$element.field.name`_delete_link"}Delete{/define_slot}
{/if}
{if $element.field.widget.question}
{$element.field.widget.question}
{/if} {define_slot name="`$element.field.name`_widget" table=$element.field.tablename} {block name="before_`$element.field.name`_widget" table=$element.field.tablename} {if $element.html} {if $element.type == 'submit'} {define_slot name="before_submit_button"}{/define_slot} {/if} {$element.html} {elseif $element.elements} {if $element.field.widget.layout == 'table'}
{if $element.field.label_link or $element.field.label_click}{/if} {$element.field.widget.label} {if $element.field.label_link or $element.field.label_click}{/if} {foreach from=$element.elements item=groupel name=grouploop} {/foreach}
{if $groupel.required}   {/if}
{if $groupel.error}
{$groupel.error}
{/if} {if $groupel.type == 'submit'} {define_slot name="before_submit_button"}{/define_slot} {/if} {$groupel.html}
{$groupel.field.widget.description}
{else} {if $element.field.widget.columns}{assign var=cols value=$element.field.widget.columns}{else}{assign var=cols value=3}{/if} {if $cols > 1}{*The user has specified columns to use so we place the grouped elements in a table.*} {assign var=numelements value=$element.elements|@count} {assign var=threshold value=$numelements/$cols}
{/if} {assign var=ctr value=0} {foreach from=$element.elements item=groupel name=grouploop} {if $groupel.field.label_link or $groupel.field.label_click}{/if} {if $groupel.field.widget.label}{$groupel.field.widget.label}{else}{$groupel.label}{/if} {if $groupel.field.label_link or $groupel.field.label_click}{/if} {if $groupel.type == 'submit'} {define_slot name="before_submit_button"}{/define_slot} {/if} {$groupel.html} {if $groupel.field.widget.description}{$groupel.field.widget.description}{/if} {if $element.field.widget.separator}{$element.field.widget.separator}{else}{$element.separator}{/if} {assign var=ctr value=$ctr+1} {if ($cols > 1) and ($ctr >= $threshold)}{assign var=ctr value=0}{/if} {/foreach} {if $cols > 1}
{/if} {/if} {/if} {block name="after_`$element.field.name`_widget" table=$element.field.tablename} {/define_slot} {* TODO: This has to be factored out!! There should be no mention of any particular widget type in this template. *} {if $element.field.widget.type == 'select' and $element.field.widget.editvalues} {/if} {* This allows us to add arbitrary content after the widget *} {if $element.field.widget.suffix} {$element.field.widget.suffix} {/if} {if $element.properties.link} Go {/if} {if $element.field.actions} {actions_menu class="field_actions" id="field_actions-`$element.field.name`" category=$element.field.actions var="actions"} {/if}
{if $element.field.display != 'block'} {if !$element.frozen}
{$element.field.widget.description}
{else}
{$element.field.widget.frozen_description}
{/if} {/if} {if $element.field.widget.focus} {/if}