<?php /* Smarty version Smarty-3.1.19, created on 2018-10-13 14:32:19
         compiled from "/home/tnsmborg/public_html/templates/_common/field-type-content-manage.tpl" */ ?>
<?php /*%%SmartyHeaderCode:21183757095bc23a330c7860-74455358%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '46b105f0b4626732196fcc13d2ff979b4bdfeff0' => 
    array (
      0 => '/home/tnsmborg/public_html/templates/_common/field-type-content-manage.tpl',
      1 => 1528949094,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '21183757095bc23a330c7860-74455358',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'field' => 0,
    'fieldName' => 0,
    'field_before' => 0,
    'item' => 0,
    'type' => 0,
    'value' => 0,
    'name' => 0,
    'core' => 0,
    'default_date' => 0,
    'k' => 0,
    'v' => 0,
    'entry' => 0,
    'max_num' => 0,
    '_field' => 0,
    '_values' => 0,
    '_value' => 0,
    'radios' => 0,
    'checkboxes' => 0,
    'tooltip' => 0,
    'field_after' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.19',
  'unifunc' => 'content_5bc23a3321e999_58556804',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5bc23a3321e999_58556804')) {function content_5bc23a3321e999_58556804($_smarty_tpl) {?><?php if (!is_callable('smarty_function_html_options')) include '/home/tnsmborg/public_html/includes/smarty/plugins/function.html_options.php';
if (!is_callable('smarty_function_html_radios')) include '/home/tnsmborg/public_html/includes/smarty/plugins/function.html_radios.php';
if (!is_callable('smarty_function_html_checkboxes')) include '/home/tnsmborg/public_html/includes/smarty/plugins/function.html_checkboxes.php';
?><?php $_smarty_tpl->tpl_vars['type'] = new Smarty_variable($_smarty_tpl->tpl_vars['field']->value['type'], null, 0);?>
<?php $_smarty_tpl->tpl_vars['fieldName'] = new Smarty_variable($_smarty_tpl->tpl_vars['field']->value['name'], null, 0);?>
<?php $_smarty_tpl->tpl_vars['name'] = new Smarty_variable("field_".((string)$_smarty_tpl->tpl_vars['field']->value['item'])."_".((string)$_smarty_tpl->tpl_vars['field']->value['name']), null, 0);?>

<?php if (isset($_smarty_tpl->tpl_vars['field_before']->value[$_smarty_tpl->tpl_vars['fieldName']->value])) {?><?php echo $_smarty_tpl->tpl_vars['field_before']->value[$_smarty_tpl->tpl_vars['fieldName']->value];?>
<?php }?>

<?php if (isset($_smarty_tpl->tpl_vars['item']->value[$_smarty_tpl->tpl_vars['fieldName']->value])) {?>
    <?php if (iaField::CHECKBOX==$_smarty_tpl->tpl_vars['type']->value) {?>
        <?php $_smarty_tpl->tpl_vars['value'] = new Smarty_variable(explode(',',$_smarty_tpl->tpl_vars['item']->value[$_smarty_tpl->tpl_vars['fieldName']->value]), null, 0);?>
    <?php } else { ?>
        <?php $_smarty_tpl->tpl_vars['value'] = new Smarty_variable($_smarty_tpl->tpl_vars['item']->value[$_smarty_tpl->tpl_vars['fieldName']->value], null, 0);?>
    <?php }?>
<?php } else { ?>
    <?php $_smarty_tpl->tpl_vars['value'] = new Smarty_variable($_smarty_tpl->tpl_vars['field']->value['default'], null, 0);?>
<?php }?>

<?php if (!empty($_smarty_tpl->tpl_vars['field']->value['disabled'])) {?>
    <input type="hidden" name="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['value']->value, ENT_QUOTES, 'UTF-8', true);?>
">
<?php }?>

<div class="form-group<?php if (iaField::TEXTAREA==$_smarty_tpl->tpl_vars['type']->value) {?> form-group--textarea<?php }?> <?php echo $_smarty_tpl->tpl_vars['field']->value['class'];?>
 <?php echo $_smarty_tpl->tpl_vars['field']->value['relation'];?>
<?php if ($_smarty_tpl->tpl_vars['field']->value['for_plan']&&!$_smarty_tpl->tpl_vars['field']->value['required']) {?> form-group--plan" style="display:none;<?php }?>" id="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
_fieldzone">
    <label for="<?php echo $_smarty_tpl->tpl_vars['name']->value;?>
">
        <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['field']->value['title'], ENT_QUOTES, 'UTF-8', true);?>
:
        <?php if ($_smarty_tpl->tpl_vars['field']->value['required']) {?><span class="is-required">*</span><?php }?>
    </label>

    <?php switch ($_smarty_tpl->tpl_vars['type']->value){?>
<?php case iaField::TEXT:?>
            <?php if ($_smarty_tpl->tpl_vars['field']->value['multilingual']&&isset($_smarty_tpl->tpl_vars['item']->value[((string)$_smarty_tpl->tpl_vars['fieldName']->value)."_".((string)$_smarty_tpl->tpl_vars['core']->value['language']['iso'])])) {?><?php $_smarty_tpl->tpl_vars['value'] = new Smarty_variable($_smarty_tpl->tpl_vars['item']->value[((string)$_smarty_tpl->tpl_vars['fieldName']->value)."_".((string)$_smarty_tpl->tpl_vars['core']->value['language']['iso'])], null, 0);?><?php }?>
            <input class="form-control" type="text" name="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
<?php if ($_smarty_tpl->tpl_vars['field']->value['multilingual']) {?>[<?php echo $_smarty_tpl->tpl_vars['core']->value['language']['iso'];?>
]<?php }?>" value="<?php if ($_smarty_tpl->tpl_vars['value']->value) {?><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['value']->value, ENT_QUOTES, 'UTF-8', true);?>
<?php } else { ?><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['field']->value['default'], ENT_QUOTES, 'UTF-8', true);?>
<?php }?>" id="<?php echo $_smarty_tpl->tpl_vars['name']->value;?>
" maxlength="<?php echo $_smarty_tpl->tpl_vars['field']->value['length'];?>
">

        <?php break;?><?php case iaField::NUMBER:?>
            <input class="form-control js-filter-numeric" type="text" name="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['value']->value, ENT_QUOTES, 'UTF-8', true);?>
" id="<?php echo $_smarty_tpl->tpl_vars['name']->value;?>
" maxlength="<?php echo $_smarty_tpl->tpl_vars['field']->value['length'];?>
">

        <?php break;?><?php case iaField::CURRENCY:?>
            <div class="input-group">
                <div class="input-group-addon"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['core']->value['defaultCurrency']['code'], ENT_QUOTES, 'UTF-8', true);?>
</div>
                <input class="form-control js-filter-numeric" type="text" name="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
" value="<?php if ($_smarty_tpl->tpl_vars['value']->value) {?><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['value']->value, ENT_QUOTES, 'UTF-8', true);?>
<?php } else { ?><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['field']->value['default'], ENT_QUOTES, 'UTF-8', true);?>
<?php }?>" id="<?php echo $_smarty_tpl->tpl_vars['name']->value;?>
" maxlength="<?php echo $_smarty_tpl->tpl_vars['field']->value['length'];?>
">
            </div>

        <?php break;?><?php case iaField::TEXTAREA:?>
            <?php if ($_smarty_tpl->tpl_vars['field']->value['multilingual']&&isset($_smarty_tpl->tpl_vars['item']->value[((string)$_smarty_tpl->tpl_vars['fieldName']->value)."_".((string)$_smarty_tpl->tpl_vars['core']->value['language']['iso'])])) {?><?php $_smarty_tpl->tpl_vars['value'] = new Smarty_variable($_smarty_tpl->tpl_vars['item']->value[((string)$_smarty_tpl->tpl_vars['fieldName']->value)."_".((string)$_smarty_tpl->tpl_vars['core']->value['language']['iso'])], null, 0);?><?php }?>
            <?php if (!$_smarty_tpl->tpl_vars['field']->value['use_editor']) {?>
                <textarea class="form-control" name="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
<?php if ($_smarty_tpl->tpl_vars['field']->value['multilingual']) {?>[<?php echo $_smarty_tpl->tpl_vars['core']->value['language']['iso'];?>
]<?php }?>" rows="8" id="<?php echo $_smarty_tpl->tpl_vars['name']->value;?>
"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['value']->value, ENT_QUOTES, 'UTF-8', true);?>
</textarea>
                <?php if ($_smarty_tpl->tpl_vars['field']->value['length']>0) {?>
                    <?php $_smarty_tpl->smarty->_tag_stack[] = array('ia_add_js', array()); $_block_repeat=true; echo iaSmarty::ia_add_js(array(), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>

$(function() {
    $('#<?php echo $_smarty_tpl->tpl_vars['name']->value;?>
').dodosTextCounter(<?php echo $_smarty_tpl->tpl_vars['field']->value['length'];?>
, {
        counterDisplayElement: 'span',
        counterDisplayClass: 'textcounter_<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
'
    });
    $('.textcounter_<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
').addClass('textcounter').wrap('<p class="help-block"></p>').before('<?php echo iaSmarty::lang(array('key'=>'chars_left'),$_smarty_tpl);?>
 ');
});
                    <?php $_block_content = ob_get_clean(); $_block_repeat=false; echo iaSmarty::ia_add_js(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>

                    <?php echo iaSmarty::ia_print_js(array('files'=>'jquery/plugins/jquery.textcounter'),$_smarty_tpl);?>

                <?php }?>
            <?php } else { ?>
                <?php ob_start();?><?php if ($_smarty_tpl->tpl_vars['field']->value['multilingual']) {?><?php echo "[";?><?php echo (string)$_smarty_tpl->tpl_vars['core']->value['language']['iso'];?><?php echo "]";?><?php }?><?php $_tmp1=ob_get_clean();?><?php echo iaSmarty::ia_wysiwyg(array('value'=>$_smarty_tpl->tpl_vars['value']->value,'name'=>((string)$_smarty_tpl->tpl_vars['field']->value['name']).$_tmp1),$_smarty_tpl);?>

            <?php }?>

        <?php break;?><?php case iaField::URL:?>
            <?php if (!is_array($_smarty_tpl->tpl_vars['value']->value)) {?>
                <?php $_smarty_tpl->tpl_vars['value'] = new Smarty_variable(explode('|',$_smarty_tpl->tpl_vars['value']->value), null, 0);?>
            <?php }?>

            <div class="row">
                <div class="col-md-6">
                    <label for="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
[title]"><?php echo iaSmarty::lang(array('key'=>'title'),$_smarty_tpl);?>
:</label>
                    <input class="form-control" type="text" name="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
[title]" value="<?php if (isset($_smarty_tpl->tpl_vars['value']->value['title'])) {?><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['value']->value['title'], ENT_QUOTES, 'UTF-8', true);?>
<?php } elseif (!empty($_smarty_tpl->tpl_vars['value']->value[1])) {?><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['value']->value[1], ENT_QUOTES, 'UTF-8', true);?>
<?php }?>">
                </div>
                <div class="col-md-6">
                    <label for="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
[url]"><?php echo iaSmarty::lang(array('key'=>'url'),$_smarty_tpl);?>
:</label>
                    <input class="form-control" type="text" name="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
[url]" value="<?php if (isset($_smarty_tpl->tpl_vars['value']->value['url'])) {?><?php echo $_smarty_tpl->tpl_vars['value']->value['url'];?>
<?php } elseif (!empty($_smarty_tpl->tpl_vars['value']->value[0])) {?><?php echo $_smarty_tpl->tpl_vars['value']->value[0];?>
<?php } else { ?>http://<?php }?>">
                </div>
            </div>

        <?php break;?><?php case iaField::DATE:?>
            <?php ob_start();?><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['value']->value, ENT_QUOTES, 'UTF-8', true);?>
<?php $_tmp2=ob_get_clean();?><?php $_smarty_tpl->tpl_vars['default_date'] = new Smarty_variable($_smarty_tpl->tpl_vars['value']->value&&!in_array($_smarty_tpl->tpl_vars['value']->value,array('0000-00-00','0000-00-00 00:00:00')) ? $_tmp2 : '', null, 0);?>

            <div class="row">
                <div class="col-md-6">
                    <div class="input-group date" id="field_date_<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
">
                        <input class="form-control js-datepicker" type="text" name="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
" <?php if ($_smarty_tpl->tpl_vars['field']->value['timepicker']) {?> data-date-format="YYYY-MM-DD HH:mm:ss"<?php } else { ?>data-date-format="YYYY-MM-DD"<?php }?> id="<?php echo $_smarty_tpl->tpl_vars['name']->value;?>
" value="<?php echo $_smarty_tpl->tpl_vars['default_date']->value;?>
">
                        <span class="input-group-addon js-datepicker-toggle"><span class="fa fa-calendar"></span></span>
                    </div>
                </div>
            </div>

            <?php echo iaSmarty::ia_add_media(array('files'=>'moment,datepicker'),$_smarty_tpl);?>


        <?php break;?><?php case iaField::IMAGE:?>
            <?php if ($_smarty_tpl->tpl_vars['value']->value) {?>
                <?php if (is_string($_smarty_tpl->tpl_vars['value']->value)) {?><?php $_smarty_tpl->tpl_vars['value'] = new Smarty_variable(unserialize($_smarty_tpl->tpl_vars['value']->value), null, 0);?><?php }?>
                <div class="thumbnail">
                    <div class="thumbnail__actions">
                        <button type="button" class="btn btn-danger btn-sm js-delete-file" data-item="<?php echo $_smarty_tpl->tpl_vars['field']->value['item'];?>
" data-field="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
" data-item-id="<?php echo (($tmp = @$_smarty_tpl->tpl_vars['item']->value['id'])===null||$tmp==='' ? '' : $tmp);?>
" data-file="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['value']->value['file'], ENT_QUOTES, 'UTF-8', true);?>
" title="<?php echo iaSmarty::lang(array('key'=>'delete'),$_smarty_tpl);?>
"><span class="fa fa-times"></span></button>
                    </div>

                    <?php if ($_smarty_tpl->tpl_vars['field']->value['thumb_width']==$_smarty_tpl->tpl_vars['field']->value['image_width']&&$_smarty_tpl->tpl_vars['field']->value['thumb_height']==$_smarty_tpl->tpl_vars['field']->value['image_height']) {?>
                        <?php echo iaSmarty::ia_image(array('file'=>$_smarty_tpl->tpl_vars['value']->value,'field'=>$_smarty_tpl->tpl_vars['field']->value,'width'=>$_smarty_tpl->tpl_vars['field']->value['thumb_width'],'height'=>$_smarty_tpl->tpl_vars['field']->value['thumb_height']),$_smarty_tpl);?>

                    <?php } else { ?>
                        <a href="<?php echo iaSmarty::ia_image(array('file'=>$_smarty_tpl->tpl_vars['value']->value,'field'=>$_smarty_tpl->tpl_vars['field']->value,'url'=>true,'large'=>true),$_smarty_tpl);?>
" rel="ia_lightbox[<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
]" style="max-width: <?php echo $_smarty_tpl->tpl_vars['field']->value['thumb_width'];?>
px;">
                            <?php echo iaSmarty::ia_image(array('file'=>$_smarty_tpl->tpl_vars['value']->value,'field'=>$_smarty_tpl->tpl_vars['field']->value,'width'=>$_smarty_tpl->tpl_vars['field']->value['thumb_width'],'height'=>$_smarty_tpl->tpl_vars['field']->value['thumb_height']),$_smarty_tpl);?>

                        </a>
                    <?php }?>

                    <?php  $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['value']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value) {
$_smarty_tpl->tpl_vars['v']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['v']->key;
?>
                    <input type="hidden" name="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
[<?php echo $_smarty_tpl->tpl_vars['k']->value;?>
]" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['v']->value, ENT_QUOTES, 'UTF-8', true);?>
">
                    <?php } ?>
                </div>
            <?php }?>

            <div class="input-group js-files">
                <span class="input-group-btn">
                    <span class="btn btn-primary btn-file">
                        <?php echo iaSmarty::lang(array('key'=>'browse'),$_smarty_tpl);?>
 <input type="file" name="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
[]" id="<?php echo $_smarty_tpl->tpl_vars['name']->value;?>
">
                    </span>
                </span>
                <input type="text" class="form-control js-file-name" readonly value="<?php if ($_smarty_tpl->tpl_vars['value']->value) {?><?php echo $_smarty_tpl->tpl_vars['value']->value['file'];?>
<?php }?>">
            </div>

        <?php break;?><?php case iaField::PICTURES:?>
            <?php echo iaSmarty::ia_add_media(array('files'=>'js:bootstrap/js/bootstrap-editable.min, css:_IA_URL_js/bootstrap/css/bootstrap-editable','order'=>5),$_smarty_tpl);?>


            <?php if ($_smarty_tpl->tpl_vars['value']->value) {?>
                <?php if (is_string($_smarty_tpl->tpl_vars['value']->value)) {?><?php $_smarty_tpl->tpl_vars['value'] = new Smarty_variable(unserialize($_smarty_tpl->tpl_vars['value']->value), null, 0);?><?php }?>
                <div class="row upload-items" id="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
_upload_list">
                    <?php  $_smarty_tpl->tpl_vars['entry'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['entry']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['value']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['entry']->index=-1;
foreach ($_from as $_smarty_tpl->tpl_vars['entry']->key => $_smarty_tpl->tpl_vars['entry']->value) {
$_smarty_tpl->tpl_vars['entry']->_loop = true;
 $_smarty_tpl->tpl_vars['entry']->index++;
?>
                        <div class="col-md-4">
                            <div class="thumbnail upload-items__item">
                                <div class="btn-group thumbnail__actions">
                                    <span class="btn btn-default btn-sm drag-handle"><span class="fa fa-arrows"></span></span>
                                    <button type="button" class="btn btn-sm btn-danger js-delete-file" data-item="<?php echo $_smarty_tpl->tpl_vars['field']->value['item'];?>
" data-field="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
" data-item-id="<?php echo (($tmp = @$_smarty_tpl->tpl_vars['item']->value['id'])===null||$tmp==='' ? '' : $tmp);?>
" data-file="<?php echo $_smarty_tpl->tpl_vars['entry']->value['file'];?>
" title="<?php echo iaSmarty::lang(array('key'=>'delete'),$_smarty_tpl);?>
"><span class="fa fa-times"></span></button>
                                </div>

                                <a class="thumbnail__image" href="<?php echo iaSmarty::ia_image(array('file'=>$_smarty_tpl->tpl_vars['entry']->value,'field'=>$_smarty_tpl->tpl_vars['field']->value,'url'=>true,'large'=>true),$_smarty_tpl);?>
" rel="ia_lightbox[<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
]">
                                    <?php echo iaSmarty::ia_image(array('file'=>$_smarty_tpl->tpl_vars['entry']->value,'field'=>$_smarty_tpl->tpl_vars['field']->value,'class'=>'img-responsive'),$_smarty_tpl);?>

                                </a>

                                
                                <?php  $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['entry']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value) {
$_smarty_tpl->tpl_vars['v']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['v']->key;
?>
                                <input type="hidden" name="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
[<?php echo $_smarty_tpl->tpl_vars['entry']->index;?>
][<?php echo $_smarty_tpl->tpl_vars['k']->value;?>
]" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['v']->value, ENT_QUOTES, 'UTF-8', true);?>
">
                                <?php } ?>
                            </div>
                        </div>
                    <?php } ?>
                </div>

                <?php $_smarty_tpl->smarty->_tag_stack[] = array('ia_add_js', array()); $_block_repeat=true; echo iaSmarty::ia_add_js(array(), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>

$(function() {
    var params = {
        handle: '.drag-handle'
    }

    intelli.sortable('<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
_upload_list', params);
});
                <?php $_block_content = ob_get_clean(); $_block_repeat=false; echo iaSmarty::ia_add_js(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>


                <?php $_smarty_tpl->tpl_vars['max_num'] = new Smarty_variable(($_smarty_tpl->tpl_vars['field']->value['length']-count($_smarty_tpl->tpl_vars['value']->value)), null, 0);?>
            <?php } else { ?>
                <?php $_smarty_tpl->tpl_vars['max_num'] = new Smarty_variable($_smarty_tpl->tpl_vars['field']->value['length'], null, 0);?>
            <?php }?>

            <div class="upload-list" id="wrap_<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
" <?php if ($_smarty_tpl->tpl_vars['max_num']->value<=0) {?>style="display: none;"<?php }?>>
                <div class="upload-list__item">
                    <div class="input-group js-files">
                        <div class="input-group-btn">
                            <span class="btn btn-primary btn-file">
                                <?php echo iaSmarty::lang(array('key'=>'browse'),$_smarty_tpl);?>
 <input type="file" name="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
[]">
                            </span>
                        </div>
                        <input type="text" readonly class="form-control js-file-name">
                        <?php if ($_smarty_tpl->tpl_vars['max_num']->value>0) {?>
                            <div class="input-group-btn">
                                <button type="button" class="js-add-img btn btn-default"><span class="fa fa-plus"></span></button>
                                <button type="button" class="js-remove-img btn btn-default"><span class="fa fa-minus"></span></button>
                            </div>
                        <?php }?>
                    </div>
                </div>

                <input type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['max_num']->value;?>
" id="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
">
            </div>

        <?php break;?><?php case iaField::STORAGE:?>
            <?php if ($_smarty_tpl->tpl_vars['value']->value) {?>
                <?php if (is_string($_smarty_tpl->tpl_vars['value']->value)) {?><?php $_smarty_tpl->tpl_vars['value'] = new Smarty_variable(unserialize($_smarty_tpl->tpl_vars['value']->value), null, 0);?><?php }?>
                <div class="upload-items upload-items--files" id="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
_upload_list">
                    <?php  $_smarty_tpl->tpl_vars['entry'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['entry']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['value']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['entry']->index=-1;
foreach ($_from as $_smarty_tpl->tpl_vars['entry']->key => $_smarty_tpl->tpl_vars['entry']->value) {
$_smarty_tpl->tpl_vars['entry']->_loop = true;
 $_smarty_tpl->tpl_vars['entry']->index++;
?>
                        <div class="input-group upload-items__item">
                            <input type="text" class="form-control" name="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
[<?php echo $_smarty_tpl->tpl_vars['entry']->index;?>
][title]" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['entry']->value['title'], ENT_QUOTES, 'UTF-8', true);?>
">
                            <input type="hidden" name="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
[<?php echo $_smarty_tpl->tpl_vars['entry']->index;?>
][path]" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['entry']->value['path'], ENT_QUOTES, 'UTF-8', true);?>
">
                            <input type="hidden" name="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
[<?php echo $_smarty_tpl->tpl_vars['entry']->index;?>
][file]" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['entry']->value['file'], ENT_QUOTES, 'UTF-8', true);?>
">
                            <div class="input-group-btn">
                                <a class="btn btn-default" href="<?php echo $_smarty_tpl->tpl_vars['core']->value['page']['nonProtocolUrl'];?>
uploads/<?php echo $_smarty_tpl->tpl_vars['entry']->value['path'];?>
<?php echo $_smarty_tpl->tpl_vars['entry']->value['file'];?>
" title="<?php echo iaSmarty::lang(array('key'=>'download'),$_smarty_tpl);?>
" download><span class="fa fa-cloud-download"></span> <?php echo iaSmarty::lang(array('key'=>'download'),$_smarty_tpl);?>
</a>
                                <span class="btn btn-default drag-handle"><span class="fa fa-arrows-v"></span></span>
                                <button type="button" class="btn btn-danger js-delete-file" data-item="<?php echo $_smarty_tpl->tpl_vars['field']->value['item'];?>
" data-field="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
" data-item-id="<?php echo (($tmp = @$_smarty_tpl->tpl_vars['item']->value['id'])===null||$tmp==='' ? '' : $tmp);?>
" data-file="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['entry']->value['file'], ENT_QUOTES, 'UTF-8', true);?>
"><?php echo iaSmarty::lang(array('key'=>'delete'),$_smarty_tpl);?>
</button>
                            </div>
                        </div>
                    <?php } ?>
                </div>
                <?php $_smarty_tpl->tpl_vars['max_num'] = new Smarty_variable(($_smarty_tpl->tpl_vars['field']->value['length']-count($_smarty_tpl->tpl_vars['value']->value)), null, 0);?>
            <?php } else { ?>
                <?php $_smarty_tpl->tpl_vars['max_num'] = new Smarty_variable($_smarty_tpl->tpl_vars['field']->value['length'], null, 0);?>
            <?php }?>

            <div class="upload-list" id="wrap_<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
" <?php if ($_smarty_tpl->tpl_vars['max_num']->value<=0) {?>style="display: none;"<?php }?>>
                <div class="row upload-list__item">
                    <div class="col-md-6">
                        <div class="input-group js-files">
                            <div class="input-group-btn">
                                <span class="btn btn-primary btn-file">
                                    <?php echo iaSmarty::lang(array('key'=>'browse'),$_smarty_tpl);?>
 <input type="file" name="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
[]">
                                </span>
                            </div>
                            <input type="text" readonly class="form-control js-file-name">
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="input-group">
                            <input type="text" class="form-control" placeholder="<?php echo iaSmarty::lang(array('key'=>'title'),$_smarty_tpl);?>
" name="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
_title[]" maxlength="100">
                            <?php if ($_smarty_tpl->tpl_vars['max_num']->value>0) {?>
                                <div class="input-group-btn">
                                    <button type="button" class="js-add-img btn btn-default"><span class="fa fa-plus"></span></button>
                                    <button type="button" class="js-remove-img btn btn-default"><span class="fa fa-minus"></span></button>
                                </div>
                            <?php }?>
                        </div>
                    </div>
                </div>

                <input type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['max_num']->value;?>
" id="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
">
            </div>

        <?php break;?><?php case iaField::TREE:?>
            <input class="form-control" type="text" id="label-<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
" disabled>
            <input type="hidden" name="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
" id="input-<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['value']->value, ENT_QUOTES, 'UTF-8', true);?>
">
            <div class="js-tree categories-tree" data-field="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
" data-nodes="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['field']->value['values'], ENT_QUOTES, 'UTF-8', true);?>
" data-multiple="<?php echo $_smarty_tpl->tpl_vars['field']->value['timepicker'];?>
"></div>
            <?php echo iaSmarty::ia_add_media(array('files'=>'tree'),$_smarty_tpl);?>

            <?php $_smarty_tpl->smarty->_tag_stack[] = array('ia_add_js', array('order'=>5)); $_block_repeat=true; echo iaSmarty::ia_add_js(array('order'=>5), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>

$(function() {
    'use strict';

    $('.js-tree').each(function() {
        var data = $(this).data(),
            options = { core: { data: data.nodes, multiple: data.multiple } };

        if (data.multiple) options.plugins = ['checkbox'];

        $(this).jstree(options)
        .on('changed.jstree', function(e, d) {
            var nodes = [], ids = [];
            for (var i = 0; i < d.selected.length; i++)
            {
                var node = d.instance.get_node(d.selected[i]);
                nodes.push(node.text.trim());
                ids.push(node.id);
            }

            var fieldName = $(this).data('field');

            $('#label-' + fieldName).val(nodes.join(', '));
            $('#input-' + fieldName).val(ids.join(', '));
        })
        .on('ready.jstree', function(e, d) {
            var nodes = $('#input-' + $(this).data('field')).val().split(',');
            d.instance.open_all();
            for (var i in nodes) {
                d.instance.select_node(nodes[i]);
            }
        })
    });
});
            <?php $_block_content = ob_get_clean(); $_block_repeat=false; echo iaSmarty::ia_add_js(array('order'=>5), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>

    <?php }?>

        <?php if ($_smarty_tpl->tpl_vars['type']->value==iaField::COMBO) {?>
            <select class="form-control" name="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
" id="<?php echo $_smarty_tpl->tpl_vars['name']->value;?>
"<?php if (isset($_smarty_tpl->tpl_vars['field']->value['disabled'])&&$_smarty_tpl->tpl_vars['field']->value['disabled']) {?> disabled<?php }?>>
                <option value=""><?php echo iaSmarty::lang(array('key'=>'_select_'),$_smarty_tpl);?>
</option>
                <?php if (!empty($_smarty_tpl->tpl_vars['field']->value['values'])) {?>
                    <?php echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['field']->value['values'],'selected'=>$_smarty_tpl->tpl_vars['value']->value),$_smarty_tpl);?>

                <?php }?>
            </select>

            <?php if ($_smarty_tpl->tpl_vars['field']->value['relation']=='parent'&&$_smarty_tpl->tpl_vars['field']->value['children']) {?>
                <?php $_smarty_tpl->smarty->_tag_stack[] = array('ia_add_js', array('order'=>5)); $_block_repeat=true; echo iaSmarty::ia_add_js(array('order'=>5), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>

$(function() {
$('<?php  $_smarty_tpl->tpl_vars['_values'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['_values']->_loop = false;
 $_smarty_tpl->tpl_vars['_field'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['field']->value['children']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['_values']->total= $_smarty_tpl->_count($_from);
 $_smarty_tpl->tpl_vars['_values']->iteration=0;
foreach ($_from as $_smarty_tpl->tpl_vars['_values']->key => $_smarty_tpl->tpl_vars['_values']->value) {
$_smarty_tpl->tpl_vars['_values']->_loop = true;
 $_smarty_tpl->tpl_vars['_field']->value = $_smarty_tpl->tpl_vars['_values']->key;
 $_smarty_tpl->tpl_vars['_values']->iteration++;
 $_smarty_tpl->tpl_vars['_values']->last = $_smarty_tpl->tpl_vars['_values']->iteration === $_smarty_tpl->tpl_vars['_values']->total;
?>#<?php echo $_smarty_tpl->tpl_vars['_field']->value;?>
_fieldzone<?php if (!$_smarty_tpl->tpl_vars['_values']->last) {?>, <?php }?><?php } ?>').addClass('hide_<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
');
$('#<?php echo $_smarty_tpl->tpl_vars['name']->value;?>
').on('change', function() {
    var value = $(this).val();
    $('.hide_<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
').hide();
    <?php  $_smarty_tpl->tpl_vars['_values'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['_values']->_loop = false;
 $_smarty_tpl->tpl_vars['_field'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['field']->value['children']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['_values']->total= $_smarty_tpl->_count($_from);
 $_smarty_tpl->tpl_vars['_values']->iteration=0;
foreach ($_from as $_smarty_tpl->tpl_vars['_values']->key => $_smarty_tpl->tpl_vars['_values']->value) {
$_smarty_tpl->tpl_vars['_values']->_loop = true;
 $_smarty_tpl->tpl_vars['_field']->value = $_smarty_tpl->tpl_vars['_values']->key;
 $_smarty_tpl->tpl_vars['_values']->iteration++;
 $_smarty_tpl->tpl_vars['_values']->last = $_smarty_tpl->tpl_vars['_values']->iteration === $_smarty_tpl->tpl_vars['_values']->total;
?>
    if ($.inArray(value, [<?php  $_smarty_tpl->tpl_vars['_value'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['_value']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['_values']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['_value']->total= $_smarty_tpl->_count($_from);
 $_smarty_tpl->tpl_vars['_value']->iteration=0;
foreach ($_from as $_smarty_tpl->tpl_vars['_value']->key => $_smarty_tpl->tpl_vars['_value']->value) {
$_smarty_tpl->tpl_vars['_value']->_loop = true;
 $_smarty_tpl->tpl_vars['_value']->iteration++;
 $_smarty_tpl->tpl_vars['_value']->last = $_smarty_tpl->tpl_vars['_value']->iteration === $_smarty_tpl->tpl_vars['_value']->total;
?>'<?php echo $_smarty_tpl->tpl_vars['_value']->value;?>
'<?php if (!$_smarty_tpl->tpl_vars['_value']->last) {?>,<?php }?><?php } ?>])!=-1) $('#<?php echo $_smarty_tpl->tpl_vars['_field']->value;?>
_fieldzone').show();
    <?php } ?>
    $('fieldset').show().each(function(index, item) {
        if ($('.fieldset-wrapper', item).length > 0) {
            $('.fieldset-wrapper div.fieldzone:visible, .fieldset-wrapper div.fieldzone.regular', item).length == 0
                ? $(this).hide()
                : $(this).show();
        }
    });
}).change();
});
                <?php $_block_content = ob_get_clean(); $_block_repeat=false; echo iaSmarty::ia_add_js(array('order'=>5), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>

            <?php }?>

        <?php } elseif ($_smarty_tpl->tpl_vars['type']->value==iaField::RADIO) {?>
            <div class="radios-list">
                <?php if (!empty($_smarty_tpl->tpl_vars['field']->value['values'])) {?>
                    <?php echo smarty_function_html_radios(array('assign'=>'radios','name'=>$_smarty_tpl->tpl_vars['fieldName']->value,'id'=>$_smarty_tpl->tpl_vars['name']->value,'options'=>$_smarty_tpl->tpl_vars['field']->value['values'],'selected'=>$_smarty_tpl->tpl_vars['value']->value,'separator'=>'</div>'),$_smarty_tpl);?>

                    <div class="radio"><?php echo implode('<div class="radio">',$_smarty_tpl->tpl_vars['radios']->value);?>

                <?php }?>
            </div>

            <?php if ($_smarty_tpl->tpl_vars['field']->value['relation']=='parent'&&$_smarty_tpl->tpl_vars['field']->value['children']) {?>
                <?php $_smarty_tpl->smarty->_tag_stack[] = array('ia_add_js', array('order'=>5)); $_block_repeat=true; echo iaSmarty::ia_add_js(array('order'=>5), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>

$(function() {
    $('<?php  $_smarty_tpl->tpl_vars['_values'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['_values']->_loop = false;
 $_smarty_tpl->tpl_vars['_field'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['field']->value['children']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['_values']->total= $_smarty_tpl->_count($_from);
 $_smarty_tpl->tpl_vars['_values']->iteration=0;
foreach ($_from as $_smarty_tpl->tpl_vars['_values']->key => $_smarty_tpl->tpl_vars['_values']->value) {
$_smarty_tpl->tpl_vars['_values']->_loop = true;
 $_smarty_tpl->tpl_vars['_field']->value = $_smarty_tpl->tpl_vars['_values']->key;
 $_smarty_tpl->tpl_vars['_values']->iteration++;
 $_smarty_tpl->tpl_vars['_values']->last = $_smarty_tpl->tpl_vars['_values']->iteration === $_smarty_tpl->tpl_vars['_values']->total;
?>#<?php echo $_smarty_tpl->tpl_vars['_field']->value;?>
_fieldzone<?php if (!$_smarty_tpl->tpl_vars['_values']->last) {?>, <?php }?><?php } ?>').addClass('hide_<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
');

    $('input[name="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
"]').on('change', function() {
        var $this = $(this),
            value = $(this).val();

        if ($this.is(':checked')) {
            $('hide_<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
').hide();

            <?php  $_smarty_tpl->tpl_vars['_values'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['_values']->_loop = false;
 $_smarty_tpl->tpl_vars['_field'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['field']->value['children']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['_values']->total= $_smarty_tpl->_count($_from);
 $_smarty_tpl->tpl_vars['_values']->iteration=0;
foreach ($_from as $_smarty_tpl->tpl_vars['_values']->key => $_smarty_tpl->tpl_vars['_values']->value) {
$_smarty_tpl->tpl_vars['_values']->_loop = true;
 $_smarty_tpl->tpl_vars['_field']->value = $_smarty_tpl->tpl_vars['_values']->key;
 $_smarty_tpl->tpl_vars['_values']->iteration++;
 $_smarty_tpl->tpl_vars['_values']->last = $_smarty_tpl->tpl_vars['_values']->iteration === $_smarty_tpl->tpl_vars['_values']->total;
?>
                if ($.inArray(value, [<?php  $_smarty_tpl->tpl_vars['_value'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['_value']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['_values']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['_value']->total= $_smarty_tpl->_count($_from);
 $_smarty_tpl->tpl_vars['_value']->iteration=0;
foreach ($_from as $_smarty_tpl->tpl_vars['_value']->key => $_smarty_tpl->tpl_vars['_value']->value) {
$_smarty_tpl->tpl_vars['_value']->_loop = true;
 $_smarty_tpl->tpl_vars['_value']->iteration++;
 $_smarty_tpl->tpl_vars['_value']->last = $_smarty_tpl->tpl_vars['_value']->iteration === $_smarty_tpl->tpl_vars['_value']->total;
?>'<?php echo $_smarty_tpl->tpl_vars['_value']->value;?>
'<?php if (!$_smarty_tpl->tpl_vars['_value']->last) {?>,<?php }?><?php } ?>]) != -1) {
                    $('#<?php echo $_smarty_tpl->tpl_vars['_field']->value;?>
_fieldzone').show();
                } else {
                    $('#<?php echo $_smarty_tpl->tpl_vars['_field']->value;?>
_fieldzone').hide();
                }
            <?php } ?>
        }
    }).change();
});
                <?php $_block_content = ob_get_clean(); $_block_repeat=false; echo iaSmarty::ia_add_js(array('order'=>5), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>

            <?php }?>

        <?php } elseif ($_smarty_tpl->tpl_vars['type']->value==iaField::CHECKBOX) {?>
            <div class="radios-list">
                <?php if (!empty($_smarty_tpl->tpl_vars['field']->value['values'])) {?>
                    <?php echo smarty_function_html_checkboxes(array('assign'=>'checkboxes','name'=>$_smarty_tpl->tpl_vars['fieldName']->value,'id'=>$_smarty_tpl->tpl_vars['name']->value,'options'=>$_smarty_tpl->tpl_vars['field']->value['values'],'selected'=>$_smarty_tpl->tpl_vars['value']->value,'separator'=>'</div>'),$_smarty_tpl);?>

                    <div class="checkbox"><?php echo implode('<div class="checkbox">',$_smarty_tpl->tpl_vars['checkboxes']->value);?>

                <?php }?>
            </div>

            <?php if ($_smarty_tpl->tpl_vars['field']->value['relation']=='parent'&&$_smarty_tpl->tpl_vars['field']->value['children']) {?>
            <?php $_smarty_tpl->smarty->_tag_stack[] = array('ia_add_js', array('order'=>5)); $_block_repeat=true; echo iaSmarty::ia_add_js(array('order'=>5), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>

$(function() {
    $('<?php  $_smarty_tpl->tpl_vars['_values'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['_values']->_loop = false;
 $_smarty_tpl->tpl_vars['_field'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['field']->value['children']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['_values']->total= $_smarty_tpl->_count($_from);
 $_smarty_tpl->tpl_vars['_values']->iteration=0;
foreach ($_from as $_smarty_tpl->tpl_vars['_values']->key => $_smarty_tpl->tpl_vars['_values']->value) {
$_smarty_tpl->tpl_vars['_values']->_loop = true;
 $_smarty_tpl->tpl_vars['_field']->value = $_smarty_tpl->tpl_vars['_values']->key;
 $_smarty_tpl->tpl_vars['_values']->iteration++;
 $_smarty_tpl->tpl_vars['_values']->last = $_smarty_tpl->tpl_vars['_values']->iteration === $_smarty_tpl->tpl_vars['_values']->total;
?>#<?php echo $_smarty_tpl->tpl_vars['_field']->value;?>
_fieldzone<?php if (!$_smarty_tpl->tpl_vars['_values']->last) {?>, <?php }?><?php } ?>').addClass('hide_<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
');
    $('input[name="<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
[]"]').on('change', function() {
        $('.hide_<?php echo $_smarty_tpl->tpl_vars['fieldName']->value;?>
').hide();
        $('input[type="checkbox"]:checked', '#type_fieldzone').each(function() {
            var value = $(this).val();
            <?php  $_smarty_tpl->tpl_vars['_values'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['_values']->_loop = false;
 $_smarty_tpl->tpl_vars['_field'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['field']->value['children']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['_values']->total= $_smarty_tpl->_count($_from);
 $_smarty_tpl->tpl_vars['_values']->iteration=0;
foreach ($_from as $_smarty_tpl->tpl_vars['_values']->key => $_smarty_tpl->tpl_vars['_values']->value) {
$_smarty_tpl->tpl_vars['_values']->_loop = true;
 $_smarty_tpl->tpl_vars['_field']->value = $_smarty_tpl->tpl_vars['_values']->key;
 $_smarty_tpl->tpl_vars['_values']->iteration++;
 $_smarty_tpl->tpl_vars['_values']->last = $_smarty_tpl->tpl_vars['_values']->iteration === $_smarty_tpl->tpl_vars['_values']->total;
?>
            if ($.inArray(value, [<?php  $_smarty_tpl->tpl_vars['_value'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['_value']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['_values']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['_value']->total= $_smarty_tpl->_count($_from);
 $_smarty_tpl->tpl_vars['_value']->iteration=0;
foreach ($_from as $_smarty_tpl->tpl_vars['_value']->key => $_smarty_tpl->tpl_vars['_value']->value) {
$_smarty_tpl->tpl_vars['_value']->_loop = true;
 $_smarty_tpl->tpl_vars['_value']->iteration++;
 $_smarty_tpl->tpl_vars['_value']->last = $_smarty_tpl->tpl_vars['_value']->iteration === $_smarty_tpl->tpl_vars['_value']->total;
?>'<?php echo $_smarty_tpl->tpl_vars['_value']->value;?>
'<?php if (!$_smarty_tpl->tpl_vars['_value']->last) {?>,<?php }?><?php } ?>])!=-1) $('#<?php echo $_smarty_tpl->tpl_vars['_field']->value;?>
_fieldzone').show();
            <?php } ?>
        });
    }).change();
});
            <?php $_block_content = ob_get_clean(); $_block_repeat=false; echo iaSmarty::ia_add_js(array('order'=>5), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>

            <?php }?>
        <?php }?>

        <?php ob_start();?><?php echo iaSmarty::lang(array('key'=>"field_tooltip_".((string)$_smarty_tpl->tpl_vars['field']->value['item'])."_".((string)$_smarty_tpl->tpl_vars['field']->value['name']),'default'=>''),$_smarty_tpl);?>
<?php $_tmp3=ob_get_clean();?><?php $_smarty_tpl->tpl_vars['tooltip'] = new Smarty_variable($_tmp3, null, 0);?>
        <?php if ($_smarty_tpl->tpl_vars['tooltip']->value) {?><p class="help-block help-block--tooltip"><?php echo $_smarty_tpl->tpl_vars['tooltip']->value;?>
</p><?php }?>
</div>
<?php if (isset($_smarty_tpl->tpl_vars['field_after']->value[$_smarty_tpl->tpl_vars['fieldName']->value])) {?><?php echo $_smarty_tpl->tpl_vars['field_after']->value[$_smarty_tpl->tpl_vars['fieldName']->value];?>
<?php }?><?php }} ?>
