/**
  * Build Fields Parameter Options
  */
 public function makeFieldsOptions()
 {
     $soption = array(array('id' => 'active_on', 'value' => 1, 'label' => $this->l('Enabled')), array('id' => 'active_off', 'value' => 0, 'label' => $this->l('Disabled')));
     $tskins = LeoFrameworkHelper::getSkins($this->themeName);
     $directions = LeoFrameworkHelper::getLayoutDirections($this->themeName);
     $this->lang = true;
     $skins = array();
     $skins[] = array('name' => $this->l('Default'), 'id' => 'default');
     $skins = array_merge_recursive($skins, $tskins);
     /* GENERAL SETTING */
     $general_fields = array(array('type' => 'setting_list', 'name' => 'moduleList', 'values' => "", 'default' => ''), array('type' => 'hidden', 'label' => $this->l('Theme Key'), 'name' => "theme_key", 'default' => Tools::strtoupper($this->themeKey), 'cast' => 'string'), array('type' => 'switch', 'label' => $this->l('Enable Responsive'), 'name' => $this->getConfigName('enable_responsive'), 'default' => 0, 'values' => $soption), array('label' => $this->l('Layout Direction'), 'name' => $this->getConfigName('layout_direction'), 'default' => 'default', 'type' => 'select', 'options' => array('query' => $directions, 'id' => 'id', 'name' => 'name')), array('type' => 'text', 'label' => $this->l('Layout Width'), 'name' => $this->getConfigName('layout_width'), 'default' => "auto", 'cast' => 'intval', 'desc' => $this->l('You can input auto or WIDTHpx, such as: 1170px')), array('type' => 'switch', 'label' => $this->l('Enable Copyright'), 'name' => $this->getConfigName('enable_copyright'), 'values' => $soption, 'default' => "0", 'desc' => $this->l('Allow to display your copyright information at bottom of site.')), array('type' => 'textarea', 'label' => $this->l('Copyright'), 'name' => $this->getConfigName('copyright'), 'default' => "Copyright " . date('Y') . " Powered by PrestaShop. All Rights Reserved.", 'rows' => '12', 'cols' => '30', 'autoload_rte' => true, 'lang' => true, 'autoload_rte' => true), array('type' => 'switch', 'label' => $this->l('Enable Panel Tool'), 'name' => $this->getConfigName('paneltool'), 'default' => 0, 'values' => $soption, 'desc' => $this->l('Whethere to display Panel Tool appearing on left of site.')), array('type' => 'select', 'label' => $this->l('Default Skin'), 'name' => $this->getConfigName('default_skin'), 'default' => 'default', 'options' => array('query' => $skins, 'id' => 'id', 'name' => 'name')));
     $theme_customizations = LeoFrameworkHelper::getLayoutSettingByTheme($this->themeName);
     if (isset($theme_customizations['layout'])) {
         foreach ($theme_customizations['layout'] as $key => $value) {
             $o = array('label' => $this->l(isset($value['title']) ? $value['title'] : $key), 'name' => $this->getConfigName(trim($key)), 'default' => $value['default'], 'type' => 'select', 'options' => array('query' => $value['option'], 'id' => 'id', 'name' => 'name'), 'desc' => isset($value['desc']) ? $this->l($value['desc']) : null);
             array_push($general_fields, $o);
         }
     }
     $theme_customizations_header = LeoFrameworkHelper::getPanelConfigByTheme('header', $this->themeName);
     if (isset($theme_customizations_header['configs'])) {
         foreach ($theme_customizations_header['configs'] as $key => $value) {
             $headerStyleOption = array('label' => $this->l(isset($value['title']) ? $value['title'] : $key), 'name' => $this->getConfigName(trim($key)), 'default' => $value['default'], 'type' => 'select', 'options' => array('query' => $value['option'], 'id' => 'id', 'name' => 'name'), 'desc' => isset($value['desc']) ? $this->l($value['desc']) : null);
             array_push($general_fields, $headerStyleOption);
         }
     }
     $theme_customizations_sidebar = LeoFrameworkHelper::getPanelConfigByTheme('sidebarmenu', $this->themeName);
     if (isset($theme_customizations_sidebar['configs'])) {
         foreach ($theme_customizations_sidebar['configs'] as $key => $value) {
             $headerStyleOption = array('label' => $this->l(isset($value['title']) ? $value['title'] : $key), 'name' => $this->getConfigName(trim($key)), 'default' => $value['default'], 'type' => 'select', 'options' => array('query' => $value['option'], 'id' => 'id', 'name' => 'name'), 'desc' => isset($value['desc']) ? $this->l($value['desc']) : null);
             array_push($general_fields, $headerStyleOption);
         }
     }
     /* Page Setting */
     $page_fields = array(array('type' => 'setting_list', 'name' => 'moduleList', 'values' => "", 'default' => ''), array('type' => 'select', 'label' => $this->l('Products Listing Mode'), 'name' => $this->getConfigName('listing_mode'), 'default' => "grid", 'options' => array('query' => array(array('id' => 'grid', 'name' => $this->l('Grid Mode')), array('id' => 'list', 'name' => $this->l('List Mode'))), 'id' => 'id', 'name' => 'name'), 'desc' => $this->l('Display Products In List Mode Or Grid Mode In Product List....')), array('type' => 'select', 'label' => $this->l('Columns in Product List page On Desktop'), 'name' => $this->getConfigName('grid_column'), 'default' => ' ', 'options' => array('query' => array(array('id' => '', 'name' => $this->l('Default')), array('id' => '2', 'name' => $this->l('2 Columns')), array('id' => '3', 'name' => $this->l('3 Columns')), array('id' => '4', 'name' => $this->l('4 Columns')), array('id' => '5', 'name' => $this->l('5 Columns')), array('id' => '6', 'name' => $this->l('6 Columns'))), 'id' => 'id', 'name' => 'name'), 'desc' => $this->l('How many column display in grid mode of product list.')), array('type' => 'select', 'label' => $this->l('Columns in Default Module On Desktop'), 'name' => $this->getConfigName('grid_column_module'), 'default' => ' ', 'options' => array('query' => array(array('id' => '', 'name' => $this->l('Default')), array('id' => '2', 'name' => $this->l('2 Columns')), array('id' => '3', 'name' => $this->l('3 Columns')), array('id' => '4', 'name' => $this->l('4 Columns')), array('id' => '5', 'name' => $this->l('5 Columns')), array('id' => '6', 'name' => $this->l('6 Columns'))), 'id' => 'id', 'name' => 'name'), 'desc' => $this->l('How many column display in default module of prestashop.')), array('type' => 'select', 'label' => $this->l('Product Grid Columns On Tablet'), 'name' => $this->getConfigName('grid_column_tablet'), 'default' => '', 'options' => array('query' => array(array('id' => '', 'name' => $this->l('Default')), array('id' => '1', 'name' => $this->l('1 Column')), array('id' => '2', 'name' => $this->l('2 Columns')), array('id' => '3', 'name' => $this->l('3 Columns'))), 'id' => 'id', 'name' => 'name'), 'desc' => $this->l('How many column display in table of grid mode.')), array('type' => 'select', 'label' => $this->l('Product Grid Columns On Mobile'), 'name' => $this->getConfigName('grid_column_mobile'), 'default' => '', 'options' => array('query' => array(array('id' => '', 'name' => $this->l('Default')), array('id' => '1', 'name' => $this->l('1 Column')), array('id' => '2', 'name' => $this->l('2 Columns'))), 'id' => 'id', 'name' => 'name'), 'desc' => $this->l('How many column display in Mobile of grid mode')), array('type' => 'switch', 'label' => $this->l('Enable Wishlist Link'), 'name' => $this->getConfigName('enable_wishlist'), 'default' => 0, 'values' => $soption, 'desc' => $this->l('Select no when you don not enable wishlist moduel of prestashop')), array('type' => 'switch', 'label' => $this->l('Enable Color Option'), 'name' => $this->getConfigName('enable_color'), 'default' => 0, 'values' => $soption, 'desc' => $this->l('Select no when you don not want to show color option')), array('type' => 'switch', 'label' => $this->l('Enable Tab in product Detail'), 'name' => $this->getConfigName('enable_ptab'), 'default' => 0, 'values' => $soption, 'desc' => $this->l('Select no when you don not want to use tab in product detail')), array('type' => 'switch', 'label' => $this->l('Enable Float Header'), 'name' => $this->getConfigName('enable_fheader'), 'default' => 0, 'values' => $soption, 'desc' => $this->l('Select no when you don not want your header float')));
     $font_fields = array();
     $tskins = LeoFrameworkHelper::getUserProfiles($this->themeName);
     $skins = array();
     $skins[] = array('name' => $this->l('No Use'), 'skin' => '');
     $skins = array_merge_recursive($skins, $tskins);
     $cssCode = '';
     $id_shop = $this->context->shop->id;
     $customCssFile = $this->themePath . 'css/local/' . $id_shop . 'custom.css';
     if (file_exists($customCssFile)) {
         $cssCode = trim(Tools::file_get_contents($customCssFile));
     }
     $customization_fields = array(array('type' => 'setting_list', 'name' => 'moduleList', 'values' => "", 'default' => ''), array('type' => 'select', 'label' => $this->l('Custom Profile'), 'name' => $this->getConfigName('c_profile'), 'default' => 0, 'options' => array('query' => $skins, 'id' => 'skin', 'name' => 'name'), 'desc' => $this->l('Select A Custom Theme Profile Which Generated Via Using Live Customizing Theme Tool.')), array('type' => 'switch', 'label' => $this->l('Enable Custom Css Code'), 'name' => $this->getConfigName('enable_codecss'), 'default' => 0, 'values' => $soption), array('type' => 'textarea', 'label' => $this->l('Custom Css Code'), 'name' => $this->getConfigName('c_codecss'), 'default' => $cssCode, 'values' => $soption, 'rows' => '6', 'cols' => ''), array('type' => 'switch', 'label' => $this->l('Enable Custom JS Code'), 'name' => $this->getConfigName('enable_codejs'), 'default' => "", 'values' => $soption, 'desc' => $this->l('Whethere to display Custom JS Code In Theme.')), array('type' => 'textarea', 'label' => $this->l('Custom JS Code'), 'name' => $this->getConfigName('c_codejs'), 'default' => "", 'values' => $soption, 'rows' => '6', 'cols' => ''));
     $this->context->controller->addJs(__PS_BASE_URI__ . str_replace("//", "/", 'modules/leotempcp') . '/assets/admin/form.js', 'all');
     /* FONTS FORM */
     $fonts_fields = array();
     $fonts = array(array('id' => 'Verdana', 'font' => htmlspecialchars('Verdana, Geneva, sans-serif'), 'name' => 'Verdana'), array('id' => 'Georgia', 'font' => htmlspecialchars('Georgia, "Times New Roman", Times, serif'), 'name' => 'Georgia'), array('id' => 'Arial', 'font' => htmlspecialchars('Arial, Helvetica, sans-serif'), 'name' => 'Arial'), array('id' => 'Impact', 'font' => htmlspecialchars('Impact, Arial, Helvetica, sans-serif'), 'name' => 'Impact'), array('id' => 'Tahoma', 'font' => htmlspecialchars('Tahoma, Geneva, sans-serif'), 'name' => 'Tahoma'), array('id' => 'Trebuchet', 'font' => htmlspecialchars('"Trebuchet MS", Arial, Helvetica, sans-serif'), 'name' => 'Trebuchet MS'), array('id' => 'Arial', 'font' => htmlspecialchars('"Arial Black", Gadget, sans-serif'), 'name' => 'Arial Black'), array('id' => 'Times', 'font' => htmlspecialchars('Times, "Times New Roman", serif'), 'name' => 'Times'), array('id' => 'Palatino', 'font' => htmlspecialchars('"Palatino Linotype", "Book Antiqua", Palatino, serif'), 'name' => 'Palatino Linotype'), array('id' => 'Lucida', 'font' => htmlspecialchars('"Lucida Sans Unicode", "Lucida Grande", sans-serif'), 'name' => 'Lucida Sans Unicode'), array('id' => 'MS', 'font' => htmlspecialchars('"MS Serif", "New York", serif'), 'name' => 'MS Serif'), array('id' => 'Comic', 'font' => htmlspecialchars('"Comic Sans MS", cursive'), 'name' => 'Comic Sans MS'), array('id' => 'Courier', 'font' => htmlspecialchars('"Courier New", Courier, monospace'), 'name' => 'Courier New'), array('id' => 'Lucida', 'font' => htmlspecialchars('"Lucida Console", Monaco, monospace'), 'name' => 'Lucida Console'));
     $fs = array(array('id' => '', 'name' => $this->l('Default')), array('id' => '10', 'name' => $this->l('10')), array('id' => '11', 'name' => $this->l('11')), array('id' => '12', 'name' => $this->l('12')), array('id' => '13', 'name' => $this->l('13')), array('id' => '14', 'name' => $this->l('14')));
     $fonts_fields = array(array('type' => 'setting_list', 'name' => 'moduleList', 'values' => "", 'default' => ''), array('type' => 'switch', 'label' => $this->l('Enable Custom Font'), 'name' => $this->getConfigName('enable_customfont'), 'default' => 0, 'values' => $soption), array('type' => 'select', 'label' => $this->l('Font Engines 1'), 'name' => $this->getConfigName('font_engine1'), 'default' => 'local', 'options' => array('query' => array(array('id' => 'local', 'name' => $this->l('Local')), array('id' => 'google', 'name' => $this->l('Google'))), 'id' => 'id', 'name' => 'name')), array('type' => 'select', 'label' => $this->l('Local Font Family'), 'name' => $this->getConfigName('engine1_local_font'), 'default' => '', 'options' => array('query' => $fonts, 'id' => 'id', 'name' => 'name'), 'identifier' => 'id', 'class' => 'localfont'), array('type' => 'text', 'label' => $this->l('Google Link'), 'name' => $this->getConfigName('engine1_google_link'), 'default' => '', 'identifier' => 'id', 'class' => 'localfont', 'desc' => 'For Example: http://fonts.googleapis.com/css?family=Gorditas'), array('type' => 'text', 'label' => $this->l('Google Font Family'), 'name' => $this->getConfigName('engine1_google_font'), 'default' => '', 'desc' => "For Example: 'Gorditas', cursive", 'identifier' => 'id', 'class' => 'localfont'), array('type' => 'textarea', 'label' => $this->l('Css Selector'), 'name' => $this->getConfigName('font1_selector'), 'default' => '', 'rows' => '6', 'cols' => '', 'desc' => $this->l('Example: body, h1,h2,h3, #yourstyle, .myrule div')), array('type' => 'select', 'label' => $this->l('Font Engines 2'), 'name' => $this->getConfigName('font_engine2'), 'default' => 'local', 'options' => array('query' => array(array('id' => 'local', 'name' => $this->l('Local')), array('id' => 'google', 'name' => $this->l('Google'))), 'id' => 'id', 'name' => 'name')), array('type' => 'select', 'label' => $this->l('Local Font Family'), 'name' => $this->getConfigName('engine2_local_font'), 'default' => '', 'options' => array('query' => $fonts, 'id' => 'id', 'name' => 'name'), 'identifier' => 'id', 'class' => 'localfont'), array('type' => 'text', 'label' => $this->l('Google Link'), 'name' => $this->getConfigName('engine2_google_link'), 'default' => '', 'identifier' => 'id', 'class' => 'localfont'), array('type' => 'text', 'label' => $this->l('Google Font Family'), 'name' => $this->getConfigName('engine2_google_font'), 'default' => '', 'identifier' => 'id', 'class' => 'localfont'), array('type' => 'textarea', 'label' => $this->l('Css Selector'), 'name' => $this->getConfigName('font2_selector'), 'default' => '', 'rows' => '6', 'cols' => '', 'desc' => $this->l('Example: body, h1,h2,h3, #yourstyle, .myrule div')), array('type' => 'select', 'label' => $this->l('Font Engines 3'), 'name' => $this->getConfigName('font_engine3'), 'default' => 'local', 'options' => array('query' => array(array('id' => 'local', 'name' => $this->l('Local')), array('id' => 'google', 'name' => $this->l('Google'))), 'id' => 'id', 'name' => 'name')), array('type' => 'select', 'label' => $this->l('Local Font Family'), 'name' => $this->getConfigName('engine3_local_font'), 'default' => '', 'options' => array('query' => $fonts, 'id' => 'id', 'name' => 'name'), 'identifier' => 'id', 'class' => 'localfont'), array('type' => 'text', 'label' => $this->l('Google Link'), 'name' => $this->getConfigName('engine3_google_link'), 'default' => '', 'identifier' => 'id', 'class' => 'localfont'), array('type' => 'text', 'label' => $this->l('Google Font Family'), 'name' => $this->getConfigName('engine3_google_font'), 'default' => '', 'identifier' => 'id', 'class' => 'localfont'), array('type' => 'textarea', 'label' => $this->l('Css Selector'), 'name' => $this->getConfigName('font3_selector'), 'default' => '', 'rows' => '6', 'cols' => '', 'desc' => $this->l('Example: body, h1,h2,h3, #yourstyle, .myrule div')));
     $liveThemeURL = 'index.php?tab=AdminLeotempcpTheme&token=' . Tools::getAdminTokenLite('AdminLeotempcpTheme') . '&refer=1';
     /* RENDER */
     $this->fields_options[0]['form'] = array('tinymce' => true, 'legend' => array('title' => '<span class="label label-info">' . $this->l('General Setting') . '</span>', 'icon' => 'icon-cogs'), 'description' => 'Configure Default Skin and General Information', 'input' => $general_fields, 'submit' => array('title' => $this->l('Save'), 'class' => 'button btn btn-danger'));
     $this->fields_options[1]['form'] = array('legend' => array('title' => '<span class="label label-success">' . $this->l('Pages Setting') . '</span>', 'icon' => 'icon-cogs'), 'input' => $page_fields, 'submit' => array('title' => $this->l('Save'), 'class' => 'button btn btn-danger'));
     $this->fields_options[2]['form'] = array('legend' => array('title' => '<span class="label label-danger">' . $this->l('Customization Setting') . '</span>', 'icon' => 'icon-cogs'), 'description' => $this->l('Support Customize Theme Skin Without experting Css Code') . $this->l(' The framework supports you two way to put your customization on theme.') . '<br />
             <p>' . $this->l('1. You create your css file(s) and put in LEO_YOURTHEME/css/local.') . '</p>' . $this->l('2. All files will be loaded automatic Or use tools at bellow') . '</p><hr>' . $this->l('Click Live Customizing Theme to create custom-theme-profiles and they will be listed in above dropdown box. You select one profile theme to apply for your site') . '<p>' . $this->l('!important: All theme profiles are stored in folder LEO_YOURTHEME/css/customize, it need permission 0755 to put files inside') . '</p>
             <a href="' . $liveThemeURL . '" class="btn-danger btn"><i class="icon-external-link-sign"></i> ' . $this->l('Live Customizing Theme') . '</a><br /><hr>', 'input' => $customization_fields, 'submit' => array('title' => $this->l('Save'), 'class' => 'button btn btn-danger'));
     $this->fields_options[3]['form'] = array('legend' => array('title' => '<span class="label label-default">' . $this->l('Font Setting') . '</span>', 'icon' => 'icon-cogs'), 'description' => $this->l('Enable Custom Configure Font With Google Font Or Local Font') . '<hr>' . $this->l('To Use Google Font, Please visit google font page to explore all avariable fonts http://www.google.com/fonts. Then Add Expected to Collection and paste link and font name for following inputs') . '<p><a href="#">' . $this->l('Click Here To Read Guide') . '</a></p>', 'input' => $fonts_fields, 'submit' => array('title' => $this->l('Save'), 'class' => 'button btn btn-danger'));
     $sample = new Datasample();
     $moduleList = $sample->getModuleList();
     $sample_field = array(array('type' => 'setting_list', 'name' => 'moduleList', 'values' => "", 'default' => ''), array('type' => 'modules_block', 'label' => $this->l('Module List:'), 'name' => 'moduleList', 'values' => $moduleList, 'default' => ''));
     //data sample
     $this->fields_options[4]['form'] = array('legend' => array('title' => '<span class="label label-default">' . $this->l('Sample data') . '</span>', 'icon' => 'icon-cogs'), 'description' => $this->l('You can import-Export Sample data') . '<hr>' . $this->l('Or can Back-up, Restore Database of Module from Leotheme'), 'input' => $sample_field, 'submit' => array('title' => $this->l('Save'), 'class' => 'button btn btn-danger'));
 }
    function content_56b31247240509_61413481($_smarty_tpl)
    {
        if (class_exists("LeoFrameworkHelper")) {
            $_smarty_tpl->tpl_vars['skins'] = new Smarty_variable(LeoFrameworkHelper::getSkins($_smarty_tpl->tpl_vars['LEO_THEMENAME']->value), null, 0);
            $_smarty_tpl->tpl_vars['header_styles'] = new Smarty_variable(LeoFrameworkHelper::getPanelConfigByTheme('header', $_smarty_tpl->tpl_vars['LEO_THEMENAME']->value), null, 0);
            $_smarty_tpl->tpl_vars['sidebarmenu'] = new Smarty_variable(LeoFrameworkHelper::getPanelConfigByTheme('sidebarmenu', $_smarty_tpl->tpl_vars['LEO_THEMENAME']->value), null, 0);
            $_smarty_tpl->tpl_vars['theme_customizations'] = new Smarty_variable(LeoFrameworkHelper::getLayoutSettingByTheme($_smarty_tpl->tpl_vars['LEO_THEMENAME']->value), null, 0);
            ?>
<div id="leo-paneltool" class="hidden-sm hidden-xs" data-cname="<?php 
            echo $_smarty_tpl->tpl_vars['LEO_COOKIE_THEME']->value;
            ?>
">
<?php 
            if ($_smarty_tpl->tpl_vars['skins']->value || $_smarty_tpl->tpl_vars['header_styles']->value || $_smarty_tpl->tpl_vars['theme_customizations']->value || $_smarty_tpl->tpl_vars['sidebarmenu']->value) {
                ?>
  <div class="paneltool themetool">
    <div class="panelbutton">
      <i class="fa fa-sliders"></i>
    </div>
    <div class="block-panelcontent">
        <div class="panelcontent">
            <div class="panelinner">
              <h4><?php 
                echo smartyTranslate(array('s' => 'Panel Tool'), $_smarty_tpl);
                ?>
</h4>
                          <!-- Theme layout mod section -->
              <?php 
                if ($_smarty_tpl->tpl_vars['theme_customizations']->value && isset($_smarty_tpl->tpl_vars['theme_customizations']->value['layout']) && isset($_smarty_tpl->tpl_vars['theme_customizations']->value['layout']['layout_mode']) && isset($_smarty_tpl->tpl_vars['theme_customizations']->value['layout']['layout_mode']['option'])) {
                    ?>
                <div class="group-input clearfix layout">
                  <label class="col-sm-12 control-label"><i class="fa fa-desktop"></i><?php 
                    echo smartyTranslate(array('s' => 'Layout Mod'), $_smarty_tpl);
                    ?>
</label>
                  <div class="col-sm-12">
                    <?php 
                    $_smarty_tpl->tpl_vars['layout'] = new Smarty_Variable();
                    $_smarty_tpl->tpl_vars['layout']->_loop = false;
                    $_from = $_smarty_tpl->tpl_vars['theme_customizations']->value['layout']['layout_mode']['option'];
                    if (!is_array($_from) && !is_object($_from)) {
                        settype($_from, 'array');
                    }
                    foreach ($_from as $_smarty_tpl->tpl_vars['layout']->key => $_smarty_tpl->tpl_vars['layout']->value) {
                        $_smarty_tpl->tpl_vars['layout']->_loop = true;
                        ?>
                      <span class="leo-dynamic-update-layout <?php 
                        if ($_smarty_tpl->tpl_vars['LEO_LAYOUT_MODE']->value == $_smarty_tpl->tpl_vars['layout']->value['id']) {
                            ?>
current-layout-mod<?php 
                        }
                        ?>
" data-layout-mod="<?php 
                        echo $_smarty_tpl->tpl_vars['layout']->value['id'];
                        ?>
">
                        <?php 
                        echo $_smarty_tpl->tpl_vars['layout']->value['name'];
                        ?>

                      </span>
                    <?php 
                    }
                    ?>
                  </div>
                </div>
              <?php 
                }
                ?>
              <!-- Theme skin section -->
              <?php 
                if ($_smarty_tpl->tpl_vars['skins']->value) {
                    ?>
              <div class="group-input clearfix">
                <label class="col-sm-12 control-label"><i class="fa fa-paint-brush"></i><?php 
                    echo smartyTranslate(array('s' => 'Theme'), $_smarty_tpl);
                    ?>
</label>
                <div class="col-sm-12">
                  <div data-theme-skin-id="default" class="skin-default leo-dynamic-theme-skin<?php 
                    if ($_smarty_tpl->tpl_vars['LEO_DEFAULT_SKIN']->value == 'default') {
                        ?>
 current-theme-skin<?php 
                    }
                    ?>
">
                      <label><?php 
                    echo smartyTranslate(array('s' => 'Default'), $_smarty_tpl);
                    ?>
</label>
                  </div>
                  <?php 
                    $_smarty_tpl->tpl_vars['skin'] = new Smarty_Variable();
                    $_smarty_tpl->tpl_vars['skin']->_loop = false;
                    $_from = $_smarty_tpl->tpl_vars['skins']->value;
                    if (!is_array($_from) && !is_object($_from)) {
                        settype($_from, 'array');
                    }
                    foreach ($_from as $_smarty_tpl->tpl_vars['skin']->key => $_smarty_tpl->tpl_vars['skin']->value) {
                        $_smarty_tpl->tpl_vars['skin']->_loop = true;
                        ?>
                  <div data-theme-skin-id="<?php 
                        echo $_smarty_tpl->tpl_vars['skin']->value['id'];
                        ?>
" data-theme-skin-css="<?php 
                        echo $_smarty_tpl->tpl_vars['skin']->value['css'];
                        ?>
" data-theme-skin-rtl="<?php 
                        echo $_smarty_tpl->tpl_vars['skin']->value['rtl'];
                        ?>
" class="leo-dynamic-theme-skin<?php 
                        if (isset($_smarty_tpl->tpl_vars['skin']->value['icon']) && $_smarty_tpl->tpl_vars['skin']->value['icon']) {
                            ?>
 theme-skin-type-image<?php 
                        }
                        if ($_smarty_tpl->tpl_vars['LEO_DEFAULT_SKIN']->value == $_smarty_tpl->tpl_vars['skin']->value['id']) {
                            ?>
 current-theme-skin<?php 
                        }
                        ?>
">
                    <?php 
                        if (isset($_smarty_tpl->tpl_vars['skin']->value['icon']) && $_smarty_tpl->tpl_vars['skin']->value['icon']) {
                            ?>
                      <img src="<?php 
                            echo $_smarty_tpl->tpl_vars['skin']->value['icon'];
                            ?>
" width="36" height="36" alt="" />
                    <?php 
                        } else {
                            ?>
                      <label class="<?php 
                            echo $_smarty_tpl->tpl_vars['skin']->value['name'];
                            ?>
"><?php 
                            echo $_smarty_tpl->tpl_vars['skin']->value['name'];
                            ?>
</label>
                    <?php 
                        }
                        ?>
                  </div>
                  <?php 
                    }
                    ?>
                </div>
              </div>
              <?php 
                }
                ?>
              <div class="group-input clearfix">
                <label class="col-sm-12 control-label"><i class="fa fa-credit-card"></i><?php 
                echo smartyTranslate(array('s' => 'Float Header'), $_smarty_tpl);
                ?>
</label>
                <div class="col-sm-12">
                  <div class="btn_enable_fheader">
                      <span class="enable_fheader btn_yes <?php 
                if ($_smarty_tpl->tpl_vars['USE_FHEADER']->value) {
                    ?>
current<?php 
                }
                ?>
" data-value="1">
                         <i><?php 
                echo smartyTranslate(array('s' => 'Yes'), $_smarty_tpl);
                ?>
</i>
                      </span>
                      <span class="enable_fheader btn_no <?php 
                if (!$_smarty_tpl->tpl_vars['USE_FHEADER']->value) {
                    ?>
current<?php 
                }
                ?>
" data-value="0">
                        <i><?php 
                echo smartyTranslate(array('s' => 'No'), $_smarty_tpl);
                ?>
</i>
                      </span>
                  </div>
                </div>
              </div>
              <!-- Theme header style section -->
              <!-- Theme slidebar menu section -->
              <?php 
                if ($_smarty_tpl->tpl_vars['sidebarmenu']->value && isset($_smarty_tpl->tpl_vars['sidebarmenu']->value['configs']) && isset($_smarty_tpl->tpl_vars['sidebarmenu']->value['configs']['sidebarmenu']) && isset($_smarty_tpl->tpl_vars['sidebarmenu']->value['configs']['sidebarmenu']['option'])) {
                    ?>
              <div class="group-input clearfix siderbar">
                <label class="col-sm-12 control-label"><i class="fa fa-columns"></i><?php 
                    echo smartyTranslate(array('s' => 'SideBar Menu'), $_smarty_tpl);
                    ?>
</label>
                <div class="col-sm-12">
                  <?php 
                    $_smarty_tpl->tpl_vars['sidebar_menu'] = new Smarty_Variable();
                    $_smarty_tpl->tpl_vars['sidebar_menu']->_loop = false;
                    $_from = $_smarty_tpl->tpl_vars['sidebarmenu']->value['configs']['sidebarmenu']['option'];
                    if (!is_array($_from) && !is_object($_from)) {
                        settype($_from, 'array');
                    }
                    foreach ($_from as $_smarty_tpl->tpl_vars['sidebar_menu']->key => $_smarty_tpl->tpl_vars['sidebar_menu']->value) {
                        $_smarty_tpl->tpl_vars['sidebar_menu']->_loop = true;
                        ?>
                    <span class="leo-dynamic-update-side <?php 
                        if ($_smarty_tpl->tpl_vars['sidebar_menu']->value['id'] == $_smarty_tpl->tpl_vars['LEO_SIDEBAR_MENU']->value) {
                            ?>
current-sidebar<?php 
                        }
                        ?>
" data-sidebar="<?php 
                        echo $_smarty_tpl->tpl_vars['sidebar_menu']->value['id'];
                        ?>
">
                      <?php 
                        echo $_smarty_tpl->tpl_vars['sidebar_menu']->value['name'];
                        ?>

                    </span>
                  <?php 
                    }
                    ?>
                </div>
              </div>
              <?php 
                }
                ?>
              <?php 
                if ($_smarty_tpl->tpl_vars['header_styles']->value && isset($_smarty_tpl->tpl_vars['header_styles']->value['configs']) && isset($_smarty_tpl->tpl_vars['header_styles']->value['configs']['header_style']) && isset($_smarty_tpl->tpl_vars['header_styles']->value['configs']['header_style']['option'])) {
                    ?>
              <div class="group-input clearfix">
                <label class="col-sm-12 control-label"><i class="fa fa-list-alt"></i><?php 
                    echo smartyTranslate(array('s' => 'Header Style'), $_smarty_tpl);
                    ?>
</label>
                <div class="col-sm-12">
                  <?php 
                    $_smarty_tpl->tpl_vars['header_style'] = new Smarty_Variable();
                    $_smarty_tpl->tpl_vars['header_style']->_loop = false;
                    $_from = $_smarty_tpl->tpl_vars['header_styles']->value['configs']['header_style']['option'];
                    if (!is_array($_from) && !is_object($_from)) {
                        settype($_from, 'array');
                    }
                    foreach ($_from as $_smarty_tpl->tpl_vars['header_style']->key => $_smarty_tpl->tpl_vars['header_style']->value) {
                        $_smarty_tpl->tpl_vars['header_style']->_loop = true;
                        ?>
                    <span class="leo-dynamic-update-header <?php 
                        if ($_smarty_tpl->tpl_vars['header_style']->value['id'] == $_smarty_tpl->tpl_vars['LEO_HEADER_STYLE']->value) {
                            ?>
current-header<?php 
                        }
                        ?>
" data-header-style="<?php 
                        echo $_smarty_tpl->tpl_vars['header_style']->value['id'];
                        ?>
">
                      <?php 
                        echo $_smarty_tpl->tpl_vars['header_style']->value['name'];
                        ?>

                    </span>
                  <?php 
                    }
                    ?>
                </div>
              </div>
              <?php 
                }
                ?>
            </div>
        </div>
    </div>
  </div>
<?php 
            }
            ?>

<div class="paneltool editortool">
  <div class="panelbutton">
    <i class="fa fa-sun-o"></i>
  </div>
  <div class="panelcontent editortool">
		<div class="panelinner">
			<h4>Live Theme Editor</h4>
            <?php 
            $_smarty_tpl->tpl_vars['xmlselectors'] = new Smarty_variable(LeoFrameworkHelper::renderEdtiorThemeForm($_smarty_tpl->tpl_vars['LEO_THEMENAME']->value), null, 0);
            ?>
            <?php 
            $_smarty_tpl->tpl_vars['patterns'] = new Smarty_variable(LeoFrameworkHelper::getPattern($_smarty_tpl->tpl_vars['LEO_THEMENAME']->value), null, 0);
            ?>
            <div class="clearfix" id="customize-body">
              <ul class="nav nav-tabs" id="panelTab">
                <?php 
            $_smarty_tpl->tpl_vars['output'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['output']->_loop = false;
            $_smarty_tpl->tpl_vars['for'] = new Smarty_Variable();
            $_from = $_smarty_tpl->tpl_vars['xmlselectors']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['output']->key => $_smarty_tpl->tpl_vars['output']->value) {
                $_smarty_tpl->tpl_vars['output']->_loop = true;
                $_smarty_tpl->tpl_vars['for']->value = $_smarty_tpl->tpl_vars['output']->key;
                ?>
                <li><a href="#tab-<?php 
                echo $_smarty_tpl->tpl_vars['for']->value;
                ?>
"><?php 
                echo $_smarty_tpl->tpl_vars['for']->value;
                ?>
</a></li>
                <?php 
            }
            ?>
              </ul>
            <div class="tab-content" >
            <?php 
            $_smarty_tpl->tpl_vars['items'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['items']->_loop = false;
            $_smarty_tpl->tpl_vars['for'] = new Smarty_Variable();
            $_from = $_smarty_tpl->tpl_vars['xmlselectors']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['items']->key => $_smarty_tpl->tpl_vars['items']->value) {
                $_smarty_tpl->tpl_vars['items']->_loop = true;
                $_smarty_tpl->tpl_vars['for']->value = $_smarty_tpl->tpl_vars['items']->key;
                ?>
            <div class="tab-pane" id="tab-<?php 
                echo $_smarty_tpl->tpl_vars['for']->value;
                ?>
">
            <?php 
                if (!empty($_smarty_tpl->tpl_vars['items']->value)) {
                    ?>
              <div class="accordion"  id="accordion-<?php 
                    echo $_smarty_tpl->tpl_vars['for']->value;
                    ?>
">
              <?php 
                    $_smarty_tpl->tpl_vars['group'] = new Smarty_Variable();
                    $_smarty_tpl->tpl_vars['group']->_loop = false;
                    $_from = $_smarty_tpl->tpl_vars['items']->value;
                    if (!is_array($_from) && !is_object($_from)) {
                        settype($_from, 'array');
                    }
                    $_smarty_tpl->tpl_vars['group']->iteration = 0;
                    foreach ($_from as $_smarty_tpl->tpl_vars['group']->key => $_smarty_tpl->tpl_vars['group']->value) {
                        $_smarty_tpl->tpl_vars['group']->_loop = true;
                        $_smarty_tpl->tpl_vars['group']->iteration++;
                        ?>
                 <div class="accordion-group panel panel-default">
                    <div class="accordion-headingt panel-heading">
                      <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion-<?php 
                        echo $_smarty_tpl->tpl_vars['for']->value;
                        ?>
" href="#collapse<?php 
                        echo $_smarty_tpl->tpl_vars['group']->value['match'];
                        ?>
">
                          <?php 
                        echo $_smarty_tpl->tpl_vars['group']->value['header'];
                        ?>

                      </a>
                    </div>
                    <div id="collapse<?php 
                        echo $_smarty_tpl->tpl_vars['group']->value['match'];
                        ?>
" class="accordion-body  <?php 
                        if ($_smarty_tpl->tpl_vars['group']->iteration == 1) {
                            ?>
 in<?php 
                        }
                        ?>
 collapse">
                      <div class="accordion-inner panel-body clearfix">
                      <?php 
                        $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                        $_smarty_tpl->tpl_vars['item']->_loop = false;
                        $_from = $_smarty_tpl->tpl_vars['group']->value['selector'];
                        if (!is_array($_from) && !is_object($_from)) {
                            settype($_from, 'array');
                        }
                        foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                            $_smarty_tpl->tpl_vars['item']->_loop = true;
                            ?>
                        <?php 
                            if (isset($_smarty_tpl->tpl_vars['item']->value['type']) && $_smarty_tpl->tpl_vars['item']->value['type'] == "image") {
                                ?>
                        <div class="form-group background-images cleafix">
                          <label><?php 
                                echo $_smarty_tpl->tpl_vars['item']->value['label'];
                                ?>
</label>
                          <input value="" type="hidden" name="customize[<?php 
                                echo $_smarty_tpl->tpl_vars['group']->value['match'];
                                ?>
][]" data-match="<?php 
                                echo $_smarty_tpl->tpl_vars['group']->value['match'];
                                ?>
" class="input-setting" data-selector="<?php 
                                echo $_smarty_tpl->tpl_vars['item']->value['selector'];
                                ?>
" data-attrs="background-image">
                          <a class="clear-bg label label-success" href="#"><?php 
                                echo smartyTranslate(array('s' => 'Clear'), $_smarty_tpl);
                                ?>
</a>

                          <div class="clearfix"></div>
                           <p><em style="font-size:10px"><?php 
                                echo smartyTranslate(array('s' => 'Those Images in folder YOURTHEME/img/patterns/'), $_smarty_tpl);
                                ?>
</em></p>
                          <div class="bi-wrapper clearfix">
                          <?php 
                                $_smarty_tpl->tpl_vars['pattern'] = new Smarty_Variable();
                                $_smarty_tpl->tpl_vars['pattern']->_loop = false;
                                $_from = $_smarty_tpl->tpl_vars['patterns']->value;
                                if (!is_array($_from) && !is_object($_from)) {
                                    settype($_from, 'array');
                                }
                                foreach ($_from as $_smarty_tpl->tpl_vars['pattern']->key => $_smarty_tpl->tpl_vars['pattern']->value) {
                                    $_smarty_tpl->tpl_vars['pattern']->_loop = true;
                                    ?>
                            <div style="background:url('<?php 
                                    echo $_smarty_tpl->tpl_vars['content_dir']->value;
                                    ?>
themes/<?php 
                                    echo $_smarty_tpl->tpl_vars['LEO_THEMENAME']->value;
                                    ?>
/img/patterns/<?php 
                                    echo $_smarty_tpl->tpl_vars['pattern']->value;
                                    ?>
') no-repeat center center;" class="pull-left" data-image="<?php 
                                    echo $_smarty_tpl->tpl_vars['content_dir']->value;
                                    ?>
themes/<?php 
                                    echo $_smarty_tpl->tpl_vars['LEO_THEMENAME']->value;
                                    ?>
/img/patterns/<?php 
                                    echo $_smarty_tpl->tpl_vars['pattern']->value;
                                    ?>
" data-val="../../img/patterns/<?php 
                                    echo $_smarty_tpl->tpl_vars['pattern']->value;
                                    ?>
">

                            </div>
                          <?php 
                                }
                                ?>
                          </div>

                           <ul class="bg-config">
                                            <li>
                                                <div><?php 
                                echo smartyTranslate(array('s' => 'Attachment'), $_smarty_tpl);
                                ?>
</div>
                                                <select class="form-control" data-attrs="background-attachment" name="customize[body][]" data-selector="<?php 
                                echo $_smarty_tpl->tpl_vars['item']->value['selector'];
                                ?>
" data-match="<?php 
                                echo $_smarty_tpl->tpl_vars['group']->value['match'];
                                ?>
">
                                                    <option value=""><?php 
                                echo smartyTranslate(array('s' => 'Not set'), $_smarty_tpl);
                                ?>
</option>
                                                    <?php 
                                $_smarty_tpl->tpl_vars['attachment'] = new Smarty_Variable();
                                $_smarty_tpl->tpl_vars['attachment']->_loop = false;
                                $_from = $_smarty_tpl->tpl_vars['BACKGROUNDVALUE']->value['attachment'];
                                if (!is_array($_from) && !is_object($_from)) {
                                    settype($_from, 'array');
                                }
                                foreach ($_from as $_smarty_tpl->tpl_vars['attachment']->key => $_smarty_tpl->tpl_vars['attachment']->value) {
                                    $_smarty_tpl->tpl_vars['attachment']->_loop = true;
                                    ?>
                                                        <option value="<?php 
                                    echo $_smarty_tpl->tpl_vars['attachment']->value;
                                    ?>
"><?php 
                                    echo $_smarty_tpl->tpl_vars['attachment']->value;
                                    ?>
</option>
                                                    <?php 
                                }
                                ?>
                                                </select>
                                            </li>
                                            <li>
                                                <div><?php 
                                echo smartyTranslate(array('s' => 'Position'), $_smarty_tpl);
                                ?>
</div>
                                                <select class="form-control" data-attrs="background-position" name="customize[body][]" data-selector="<?php 
                                echo $_smarty_tpl->tpl_vars['item']->value['selector'];
                                ?>
" data-match="<?php 
                                echo $_smarty_tpl->tpl_vars['group']->value['match'];
                                ?>
">
                                                    <option value=""><?php 
                                echo smartyTranslate(array('s' => 'Not set'), $_smarty_tpl);
                                ?>
</option>
                                                    <?php 
                                $_smarty_tpl->tpl_vars['position'] = new Smarty_Variable();
                                $_smarty_tpl->tpl_vars['position']->_loop = false;
                                $_from = $_smarty_tpl->tpl_vars['BACKGROUNDVALUE']->value['position'];
                                if (!is_array($_from) && !is_object($_from)) {
                                    settype($_from, 'array');
                                }
                                foreach ($_from as $_smarty_tpl->tpl_vars['position']->key => $_smarty_tpl->tpl_vars['position']->value) {
                                    $_smarty_tpl->tpl_vars['position']->_loop = true;
                                    ?>
                                                        <option value="<?php 
                                    echo $_smarty_tpl->tpl_vars['position']->value;
                                    ?>
"><?php 
                                    echo $_smarty_tpl->tpl_vars['position']->value;
                                    ?>
</option>
                                                    <?php 
                                }
                                ?>
                                                </select>
                                            </li>
                                            <li>
                                                <div><?php 
                                echo smartyTranslate(array('s' => 'Repeat'), $_smarty_tpl);
                                ?>
</div>
                                                <select class="form-control" data-attrs="background-repeat" name="customize[body][]" data-selector="<?php 
                                echo $_smarty_tpl->tpl_vars['item']->value['selector'];
                                ?>
" data-match="<?php 
                                echo $_smarty_tpl->tpl_vars['group']->value['match'];
                                ?>
">
                                                    <option value=""><?php 
                                echo smartyTranslate(array('s' => 'Not set'), $_smarty_tpl);
                                ?>
</option>
                                                    <?php 
                                $_smarty_tpl->tpl_vars['repeat'] = new Smarty_Variable();
                                $_smarty_tpl->tpl_vars['repeat']->_loop = false;
                                $_from = $_smarty_tpl->tpl_vars['BACKGROUNDVALUE']->value['repeat'];
                                if (!is_array($_from) && !is_object($_from)) {
                                    settype($_from, 'array');
                                }
                                foreach ($_from as $_smarty_tpl->tpl_vars['repeat']->key => $_smarty_tpl->tpl_vars['repeat']->value) {
                                    $_smarty_tpl->tpl_vars['repeat']->_loop = true;
                                    ?>
                                                        <option value="<?php 
                                    echo $_smarty_tpl->tpl_vars['repeat']->value;
                                    ?>
"><?php 
                                    echo $_smarty_tpl->tpl_vars['repeat']->value;
                                    ?>
</option>
                                                    <?php 
                                }
                                ?>
                                                </select>
                                            </li>
                                        </ul>
                        </div>
                        <?php 
                            } elseif ($_smarty_tpl->tpl_vars['item']->value['type'] == "fontsize") {
                                ?>
                         <div class="form-group cleafix">
                          <label><?php 
                                echo $_smarty_tpl->tpl_vars['item']->value['label'];
                                ?>
</label>
                            <select class="form-control input-setting" name="customize[<?php 
                                echo $_smarty_tpl->tpl_vars['group']->value['match'];
                                ?>
][]" data-match="<?php 
                                echo $_smarty_tpl->tpl_vars['group']->value['match'];
                                ?>
"  data-selector="<?php 
                                echo $_smarty_tpl->tpl_vars['item']->value['selector'];
                                ?>
" data-attrs="<?php 
                                echo $_smarty_tpl->tpl_vars['item']->value['attrs'];
                                ?>
">
                              <option value="">Inherit</option>
                              <?php 
                                $_smarty_tpl->tpl_vars['i'] = new Smarty_Variable();
                                $_smarty_tpl->tpl_vars['i']->step = 1;
                                $_smarty_tpl->tpl_vars['i']->total = (int) ceil(($_smarty_tpl->tpl_vars['i']->step > 0 ? 16 + 1 - 9 : 9 - 16 + 1) / abs($_smarty_tpl->tpl_vars['i']->step));
                                if ($_smarty_tpl->tpl_vars['i']->total > 0) {
                                    for ($_smarty_tpl->tpl_vars['i']->value = 9, $_smarty_tpl->tpl_vars['i']->iteration = 1; $_smarty_tpl->tpl_vars['i']->iteration <= $_smarty_tpl->tpl_vars['i']->total; $_smarty_tpl->tpl_vars['i']->value += $_smarty_tpl->tpl_vars['i']->step, $_smarty_tpl->tpl_vars['i']->iteration++) {
                                        $_smarty_tpl->tpl_vars['i']->first = $_smarty_tpl->tpl_vars['i']->iteration == 1;
                                        $_smarty_tpl->tpl_vars['i']->last = $_smarty_tpl->tpl_vars['i']->iteration == $_smarty_tpl->tpl_vars['i']->total;
                                        ?>
                              <option value="<?php 
                                        echo $_smarty_tpl->tpl_vars['i']->value;
                                        ?>
"><?php 
                                        echo $_smarty_tpl->tpl_vars['i']->value;
                                        ?>
</option>
                              <?php 
                                    }
                                }
                                ?>
                            </select>
                            <a href="#" class="clear-bg label label-success"><?php 
                                echo smartyTranslate(array('s' => 'Clear'), $_smarty_tpl);
                                ?>
</a>
                        </div>
                        <?php 
                            } else {
                                ?>
                        <div class="form-group cleafix">
                          <label><?php 
                                echo $_smarty_tpl->tpl_vars['item']->value['label'];
                                ?>
</label>
                          <input value="" size="10" name="customize[<?php 
                                echo $_smarty_tpl->tpl_vars['group']->value['match'];
                                ?>
][]" data-match="<?php 
                                echo $_smarty_tpl->tpl_vars['group']->value['match'];
                                ?>
" type="text" class="input-setting" data-selector="<?php 
                                echo $_smarty_tpl->tpl_vars['item']->value['selector'];
                                ?>
" data-attrs="<?php 
                                echo $_smarty_tpl->tpl_vars['item']->value['attrs'];
                                ?>
"><a href="#" class="clear-bg label label-success"><?php 
                                echo smartyTranslate(array('s' => 'Clear'), $_smarty_tpl);
                                ?>
</a>
                        </div>
                        <?php 
                            }
                            ?>
                        <?php 
                        }
                        ?>
                      </div>
                    </div>
                  </div>
                 <?php 
                    }
                    ?>
               </div>
              <?php 
                }
                ?>
            </div>
          <?php 
            }
            ?>
          </div>
        </div>
      </div>
    </div>
	<div class="panelbutton label-customize"></div>
  </div>
</div>
<?php 
        }
    }