2017-05-03 01:12:35 +02:00
|
|
|
{if $freeze}
|
|
|
|
{if isset($parseValue)}
|
|
|
|
{foreach $components as $c => $cconf}
|
|
|
|
{if !isset($parseValue[$c])}{continue}{/if}
|
2018-04-26 11:23:00 +02:00
|
|
|
<div>
|
2017-05-03 01:12:35 +02:00
|
|
|
<label>{tr msg=$cconf.label} : </label>
|
2018-04-26 11:23:00 +02:00
|
|
|
<ul>
|
|
|
|
{if $cconf.multiple && is_array($parseValue[$c])}
|
2018-04-27 10:02:44 +02:00
|
|
|
{foreach from=$parseValue[$c] item=cval}
|
2018-06-11 11:50:17 +02:00
|
|
|
<li><span title='{$cval.value|escape:"quotes"}'>{$cval.translated|escape:"htmlall"}</span></li>
|
2018-04-26 11:23:00 +02:00
|
|
|
{/foreach}
|
|
|
|
{else}
|
2018-06-11 11:50:17 +02:00
|
|
|
<li><span title='{$parseValue[$c].value|escape:"htmlall"}'>{$parseValue[$c].translated|escape:"htmlall"}</span></li>
|
2018-04-26 11:23:00 +02:00
|
|
|
{/if}
|
|
|
|
</ul>
|
|
|
|
</div>
|
2017-05-03 01:12:35 +02:00
|
|
|
{/foreach}
|
|
|
|
{else}
|
2018-06-11 11:50:17 +02:00
|
|
|
{$noValueTxt|escape:"htmlall"}
|
2017-05-03 01:12:35 +02:00
|
|
|
{/if}
|
|
|
|
{else}
|
2018-04-26 11:23:00 +02:00
|
|
|
{uniqid var="uuid"}
|
2018-06-11 11:50:17 +02:00
|
|
|
<input type='hidden' name='{$attr_name|escape:"quotes"}__values_uuid[]' value='{$uuid|escape:"quotes"}' />
|
2018-04-27 10:02:44 +02:00
|
|
|
{foreach from=$components key=c item=cconf name=components}
|
2018-06-11 11:50:17 +02:00
|
|
|
<div data-component='{$c|escape:"quotes"}' data-uuid='{$uuid|escape:"quotes"}'>
|
2018-04-26 11:23:00 +02:00
|
|
|
<label>
|
|
|
|
{tr msg=$cconf.label}{if $cconf.required}*{/if}
|
2018-06-11 11:50:17 +02:00
|
|
|
{if $cconf.help_info}<img class='LStips' src="{img name='help'}" alt='?' title='{$cconf.help_info|escape:"quotes"}'/>{/if}
|
2018-04-26 11:23:00 +02:00
|
|
|
:
|
|
|
|
</label>
|
2017-05-03 01:12:35 +02:00
|
|
|
{if $cconf.type=='select_list'}
|
2018-06-11 11:50:17 +02:00
|
|
|
<select name='{$attr_name|escape:"quotes"}__{$c|escape:"quotes"}__{$uuid|escape:"quotes"}[]' {if $cconf.multiple}multiple{/if}>
|
2017-05-03 01:12:35 +02:00
|
|
|
{foreach from=$cconf.possible_values key=key item=label}
|
|
|
|
{if is_array($label)}
|
|
|
|
{if count($label.possible_values)>0}
|
2018-06-11 11:50:17 +02:00
|
|
|
<optgroup label='{$label.label|escape:"quotes"}'>
|
2018-04-26 11:23:00 +02:00
|
|
|
{if $cconf.multiple && is_array($parseValue[$c])}
|
|
|
|
{html_options options=$label.possible_values selected=$parseValue[$c]}
|
|
|
|
{else}
|
|
|
|
{html_options options=$label.possible_values selected=$parseValue[$c].value}
|
|
|
|
{/if}
|
2017-05-03 01:12:35 +02:00
|
|
|
</optgroup>
|
|
|
|
{/if}
|
|
|
|
{else}
|
2018-04-26 11:23:00 +02:00
|
|
|
{assign var="selected" value=0}
|
|
|
|
{if $cconf.multiple && is_array($parseValue[$c])}
|
|
|
|
{foreach from=$parseValue[$c] item=cval}
|
|
|
|
{if $key==$cval.value}{assign var="selected" value=1}{/if}
|
|
|
|
{/foreach}
|
|
|
|
{else}
|
|
|
|
{if $key == $parseValue[$c].value}
|
|
|
|
{assign var="selected" value=1}
|
|
|
|
{/if}
|
|
|
|
{/if}
|
2018-06-11 11:50:17 +02:00
|
|
|
<option value='{$key|escape:"quotes"}' {if $selected == 1}selected{/if}>{$label|escape:"htmlall"}</option>
|
2017-05-03 01:12:35 +02:00
|
|
|
{/if}
|
|
|
|
{/foreach}
|
|
|
|
</select>
|
|
|
|
{else}
|
2018-04-26 11:23:00 +02:00
|
|
|
<ul>
|
|
|
|
{if $cconf.multiple && is_array($parseValue[$c])}
|
2018-04-27 10:02:44 +02:00
|
|
|
{foreach from=$parseValue[$c] item=cval}
|
2018-06-11 11:50:17 +02:00
|
|
|
<li><input type='text' name='{$attr_name|escape:"quotes"}__{$c|escape:"quotes"}__{$uuid|escape:"quotes"}[]' value='{$cval.value|escape:"quotes"}'/></li>
|
2018-04-26 11:23:00 +02:00
|
|
|
{foreachelse}
|
2018-06-11 11:50:17 +02:00
|
|
|
<li><input type='text' name='{$attr_name|escape:"quotes"}__{$c|escape:"quotes"}__{$uuid|escape:"quotes"}[]' value=''/></li>
|
2018-04-26 11:23:00 +02:00
|
|
|
{/foreach}
|
|
|
|
{else}
|
2018-06-11 11:50:17 +02:00
|
|
|
<li><input type='text' name='{$attr_name|escape:"quotes"}__{$c|escape:"quotes"}__{$uuid|escape:"quotes"}[]' value='{if $parseValue and $parseValue[$c]}{$parseValue[$c].value|escape:"quotes"}{/if}'/></li>
|
2018-04-26 11:23:00 +02:00
|
|
|
{/if}
|
|
|
|
</ul>
|
2017-05-03 01:12:35 +02:00
|
|
|
{/if}
|
2018-04-26 11:23:00 +02:00
|
|
|
</div>
|
2017-05-03 01:12:35 +02:00
|
|
|
{/foreach}
|
|
|
|
{/if}
|