<?php /* Smarty version Smarty-3.1.19, created on 2020-06-12 14:19:42
         compiled from "template__system/admin_admin:/home/myjobsnearme/public_html/templates/_system/admin/classifieds/refine_search.tpl" */ ?>
<?php /*%%SmartyHeaderCode:4409196745ee380ee3ead79-62275620%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'c5b284360c87d22da76932a584b6eb34dd3401a9' => 
    array (
      0 => 'template__system/admin_admin:/home/myjobsnearme/public_html/templates/_system/admin/classifieds/refine_search.tpl',
      1 => 1483999076,
      2 => 'template__system/admin_admin',
    ),
  ),
  'nocache_hash' => '4409196745ee380ee3ead79-62275620',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'refine_search_items_limit' => 0,
    'listingTypes' => 0,
    'listingType' => 0,
    'saved_fields' => 0,
    'fields' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.19',
  'unifunc' => 'content_5ee380ee46ad54_45042001',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5ee380ee46ad54_45042001')) {function content_5ee380ee46ad54_45042001($_smarty_tpl) {?><?php $_smarty_tpl->smarty->_tag_stack[] = array('breadcrumbs', array()); $_block_repeat=true; echo $_smarty_tpl->smarty->registered_plugins['block']['breadcrumbs'][0][0]->_tpl_breadcrumbs(array(), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>
<?php $_smarty_tpl->smarty->_tag_stack[] = array('tr', array()); $_block_repeat=true; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>
Refine Search Settings<?php $_block_content = ob_get_clean(); $_block_repeat=false; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>
<?php $_block_content = ob_get_clean(); $_block_repeat=false; echo $_smarty_tpl->smarty->registered_plugins['block']['breadcrumbs'][0][0]->_tpl_breadcrumbs(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>

<div class="page-title">
    <h1 class="title"><?php $_smarty_tpl->smarty->_tag_stack[] = array('tr', array()); $_block_repeat=true; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>
Refine Search Settings<?php $_block_content = ob_get_clean(); $_block_repeat=false; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>
</h1>
</div>

<form method="post" action="" class="form-inline" style="margin-bottom: 25px;">
	<input type="hidden" name="action" value="save_setting" />
	<div class="form-group with-tooltip">
        <?php $_smarty_tpl->smarty->_tag_stack[] = array('tr', array()); $_block_repeat=true; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>
Items Limit<?php $_block_content = ob_get_clean(); $_block_repeat=false; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>
:
        <div class="input-group m-t-10">
            <input type="text" name="refine_search_items_limit" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['refine_search_items_limit']->value, ENT_QUOTES, 'UTF-8', true);?>
" />
            <span class="input-group-btn">
                <input type="submit" value="<?php $_smarty_tpl->smarty->_tag_stack[] = array('tr', array()); $_block_repeat=true; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>
Save<?php $_block_content = ob_get_clean(); $_block_repeat=false; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>
" class="btn btn--secondary"/>
            </span>
        </div>
        <span class="tooltip__refine-search" data-toggle="tooltip" data-placement="auto left" title="<?php $_smarty_tpl->smarty->_tag_stack[] = array('tr', array()); $_block_repeat=true; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>
Specify the limit for the number of items to be displayed in Refine Search blocks<?php $_block_content = ob_get_clean(); $_block_repeat=false; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>
"><i class="fa fa-question-circle" aria-hidden="true"></i></span>
    </div>
</form>

<div class="errors">
</div>

<?php  $_smarty_tpl->tpl_vars['listingType'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['listingType']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['listingTypes']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['listingType']->key => $_smarty_tpl->tpl_vars['listingType']->value) {
$_smarty_tpl->tpl_vars['listingType']->_loop = true;
?>
    <div class="panel panel-default panel--wide">
        <form method="post" action="" class="panel-heading panel-heading__refine-search">
            <input type="hidden" name="action" value="save_setting" />
            <input type="hidden" name="listing_type_id" value="<?php echo $_smarty_tpl->tpl_vars['listingType']->value['id'];?>
" />
            <input type="hidden" name="turn_on_refine_search_<?php echo $_smarty_tpl->tpl_vars['listingType']->value['id'];?>
" value="0">
            <h3 class="panel-title inline-block refine-search__title"><?php $_smarty_tpl->smarty->_tag_stack[] = array('tr', array()); $_block_repeat=true; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>
<?php echo $_smarty_tpl->tpl_vars['listingType']->value['id'];?>
 Search<?php $_block_content = ob_get_clean(); $_block_repeat=false; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>
</h3>
            <label class="cr-styled">
                <input type="checkbox" name="turn_on_refine_search_<?php echo $_smarty_tpl->tpl_vars['listingType']->value['id'];?>
"  value="1" <?php if ($_smarty_tpl->tpl_vars['listingType']->value['setting']) {?>checked<?php }?> onchange='form.submit();' />
                <i class="fa"></i>
                <?php $_smarty_tpl->smarty->_tag_stack[] = array('tr', array()); $_block_repeat=true; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>
Enable Refine Search<?php $_block_content = ob_get_clean(); $_block_repeat=false; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>

            </label>
        </form>
        <form method="post" action="" class="refine-block <?php if (!$_smarty_tpl->tpl_vars['listingType']->value['setting']) {?>hidden<?php }?>">
            <div class="panel-body <?php if (!$_smarty_tpl->tpl_vars['listingType']->value['setting']) {?>hidden<?php }?>">
                <div class="table-responsive">
                    <table class="table table-striped table__refine-search">
                        <?php  $_smarty_tpl->tpl_vars['saved_fields'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['saved_fields']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['listingType']->value['saved_fields']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['saved_fields']->key => $_smarty_tpl->tpl_vars['saved_fields']->value) {
$_smarty_tpl->tpl_vars['saved_fields']->_loop = true;
?>
                            <tr>
                                <td class="sortable-handle">...</td>
                                <td width="100%">
                                    <?php $_smarty_tpl->smarty->_tag_stack[] = array('tr', array()); $_block_repeat=true; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>
<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['saved_fields']->value['caption'], ENT_QUOTES, 'UTF-8', true);?>
<?php $_block_content = ob_get_clean(); $_block_repeat=false; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>

                                    <input type="hidden" name="refine_fields[]" value="<?php echo $_smarty_tpl->tpl_vars['saved_fields']->value['id'];?>
" />
                                </td>
                                <td nowrap="nowrap"><a href="?field_id=<?php echo $_smarty_tpl->tpl_vars['saved_fields']->value['id'];?>
&action=delete" onclick='return confirm("<?php $_smarty_tpl->smarty->_tag_stack[] = array('tr', array()); $_block_repeat=true; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>
Are you sure you want to delete this field?<?php $_block_content = ob_get_clean(); $_block_repeat=false; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>
")' title="<?php $_smarty_tpl->smarty->_tag_stack[] = array('tr', array()); $_block_repeat=true; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>
Delete<?php $_block_content = ob_get_clean(); $_block_repeat=false; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>
"><i class="ion-close-circled"></i></a></td>
                            </tr>
                        <?php } ?>
                    </table>
                </div>
            </div>
            <input type="hidden" name="action" value="save" />
            <input type="hidden" name="listing_type_sid" value="<?php echo $_smarty_tpl->tpl_vars['listingType']->value['sid'];?>
" />
            <input type="hidden" name="field_id" />
            <div class="btn-group dropdown">
                <button type="button" class="btn btn-success"><?php $_smarty_tpl->smarty->_tag_stack[] = array('tr', array()); $_block_repeat=true; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>
Add<?php $_block_content = ob_get_clean(); $_block_repeat=false; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>
</button>
                <button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><i class="caret"></i></button>
                <ul class="dropdown-menu" role="menu">
                    <?php  $_smarty_tpl->tpl_vars['fields'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['fields']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['listingType']->value['fields']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['fields']->key => $_smarty_tpl->tpl_vars['fields']->value) {
$_smarty_tpl->tpl_vars['fields']->_loop = true;
?>
                        <li><a href="#" data-value="<?php echo $_smarty_tpl->tpl_vars['fields']->value['sid'];?>
"><?php $_smarty_tpl->smarty->_tag_stack[] = array('tr', array()); $_block_repeat=true; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>
<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['fields']->value['caption'], ENT_QUOTES, 'UTF-8', true);?>
<?php $_block_content = ob_get_clean(); $_block_repeat=false; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>
</a></li>
                    <?php } ?>
                    <?php if ($_smarty_tpl->tpl_vars['listingType']->value['user_fields']['id']) {?>
                        <li><a href="#" data-value="user_<?php echo $_smarty_tpl->tpl_vars['listingType']->value['user_fields']['sid'];?>
"><?php echo $_smarty_tpl->tpl_vars['listingType']->value['user_fields']['caption'];?>
</a></li>
                    <?php }?>
                </ul>
            </div>
        </form>
    </div>
    <br/>
<?php } ?>

<?php $_smarty_tpl->smarty->_tag_stack[] = array('javascript', array()); $_block_repeat=true; echo $_smarty_tpl->smarty->registered_plugins['block']['javascript'][0][0]->_tpl_javascript(array(), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>

    <script type="text/javascript">
        $('.refine-block .dropdown-menu a').on('click', function() {
            $('input[name="field_id"]').val($(this).data('value'));
            $(this).closest('.refine-block').submit();
        });
        $(document).ready(function() {
            $('tbody').sortable({
                helper: function(e, ui) {
                    ui.width(ui.width());
                    return ui;
                },
                handle: '.sortable-handle',
                update: function() {
                    $(this).closest('.refine-block').ajaxSubmit({
                        data: {
                            action: 'reorder'
                        },
                        success: function() {
                            $('.errors').empty();
                        },
                        error: function() {
                            $('.errors').empty();
                            $('.errors').append('<div class="alert alert-danger"><?php $_smarty_tpl->smarty->_tag_stack[] = array('tr', array()); $_block_repeat=true; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>
Oops... Something went wrong. Please try again!<?php $_block_content = ob_get_clean(); $_block_repeat=false; echo $_smarty_tpl->smarty->registered_plugins['block']['tr'][0][0]->translate(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>
</div>');
                        }
                    });
                }
            });

            $('.sortable-handle').disableSelection();
        });
    </script>
<?php $_block_content = ob_get_clean(); $_block_repeat=false; echo $_smarty_tpl->smarty->registered_plugins['block']['javascript'][0][0]->_tpl_javascript(array(), $_block_content, $_smarty_tpl, $_block_repeat); } array_pop($_smarty_tpl->smarty->_tag_stack);?>
<?php }} ?>
