<?php
/* Smarty version 4.3.2, created on 2024-05-20 14:49:10
  from '/var/www/html/public/legacy/themes/suite8/modules/SavedSearch/SavedSearchForm.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.3.2',
  'unifunc' => 'content_664b62e69a0d38_00715142',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '8ae4196dad13e8b849de6212fad2cd7a8686bd29' => 
    array (
      0 => '/var/www/html/public/legacy/themes/suite8/modules/SavedSearch/SavedSearchForm.tpl',
      1 => 1709743133,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_664b62e69a0d38_00715142 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_checkPlugins(array(0=>array('file'=>'/var/www/html/public/legacy/include/Smarty/plugins/function.sugar_translate.php','function'=>'smarty_function_sugar_translate',),));
?>
<div>
    <div class="col-xs-12 col-sm-6 col-md-4 col-lg-4 col-advanced-search">
        <div<?php if ($_smarty_tpl->tpl_vars['orderBySelectOnly']->value) {?> style="display:none;"<?php }?>>
            <input id='displayColumnsDef' type='hidden' name='displayColumns'>
            <input id='hideTabsDef' type='hidden' name='hideTabs'>
            <?php echo $_smarty_tpl->tpl_vars['columnChooser']->value;?>

            <br>
        </div>
        <div class="col-xs-12 saved-search-sort-column-config-row">
            <label><?php echo smarty_function_sugar_translate(array('label'=>'LBL_ORDER_BY_COLUMNS','module'=>'SavedSearch'),$_smarty_tpl);?>
</label>

        </div>
        <div class="form-item saved-search-sort-column-config-row">
            <select name='orderBy' id='orderBySelect'>
            </select>
        </div>
    </div>
    <div class="col-xs-12 col-sm-6 col-md-4 col-lg-4 col-advanced-search">
        <div class="col-xs-12 saved-search-sort-column-config-row">
            <label><?php echo smarty_function_sugar_translate(array('label'=>'LBL_DIRECTION','module'=>'SavedSearch'),$_smarty_tpl);?>
</label>
        </div>
        <div class="form-item radios saved-search-sort-column-config-row">
            <div><input id='sort_order_desc_radio' type='radio' name='sortOrder' value='DESC'
                        <?php if ($_smarty_tpl->tpl_vars['selectedSortOrder']->value == 'DESC') {?>checked<?php }?>>&nbsp;<span
                        onclick='document.getElementById("sort_order_desc_radio").checked = true'
                        style="cursor: pointer; cursor: hand"><?php echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_DESCENDING'];?>
</span></div>

            <div><input id='sort_order_asc_radio' type='radio' name='sortOrder' value='ASC'
                        <?php if ($_smarty_tpl->tpl_vars['selectedSortOrder']->value == 'ASC') {?>checked<?php }?>>&nbsp;<span
                        onclick='document.getElementById("sort_order_asc_radio").checked = true'
                        style="cursor: pointer; cursor: hand"><?php echo $_smarty_tpl->tpl_vars['MOD']->value['LBL_ASCENDING'];?>
</span>
            </div>
        </div>
    </div>

</div>
<?php echo '<script'; ?>
>
    SUGAR.savedViews.columnsMeta = <?php echo $_smarty_tpl->tpl_vars['columnsMeta']->value;?>
;
    columnsMeta = <?php echo $_smarty_tpl->tpl_vars['columnsMeta']->value;?>
;
    saved_search_select = "<?php echo $_smarty_tpl->tpl_vars['SAVED_SEARCH_SELECT']->value;?>
";
    selectedSortOrder = "<?php echo (($tmp = $_smarty_tpl->tpl_vars['selectedSortOrder']->value ?? null)===null||$tmp==='' ? 'DESC' ?? null : $tmp);?>
";
    selectedOrderBy = "<?php echo $_smarty_tpl->tpl_vars['selectedOrderBy']->value;?>
";


    
    //this populates the label that shows the name of the current saved view
    //The label is located under the update/delete buttons
    function fillInLabels() {
        //this javascript runs and populates values in savedSearchForm.tpl
        x = document.getElementById('saved_search_select');
        if ((typeof(x) != 'undefined' && x != null) && x.selectedIndex != 0) {
            curr_search_name = document.getElementById('curr_search_name');
            curr_search_name.innerHTML = '';
            curr_search_name.appendChild(document.createTextNode('"' + x.options[x.selectedIndex].text + '"'));
            document.getElementById('ss_update').disabled = false;
            document.getElementById('ss_delete').disabled = false;
            $('.hideUnusedSavedSearchElements').show();
        } else {
            document.getElementById('ss_update').disabled = true;
            document.getElementById('ss_delete').disabled = true;
            document.getElementById('curr_search_name').innerHTML = '';
            $('.hideUnusedSavedSearchElements').hide();
        }
    }
    //call scripts that need to get run onload of this form.  This function is called when image
    //to collapse/show subpanels is loaded
    function loadSSL_Scripts() {
        //this will fill in the name of the current module, and enable/disable update/delete buttons
        fillInLabels();
        //this populates the order by dropdown, and activates the chooser widget.
        SUGAR.savedViews.handleForm();
    }

    
<?php echo '</script'; ?>
>
<?php }
}
