/** * Shortcode icon_link admin interface */ public function build_shortcode_editor_options() { $html = ''; $source = array(); if (isset($_POST['shortcode_object'])) { $source = $_POST['shortcode_object']; } $html .= '<br />'; $html .= OTW_Form::select(array('id' => 'otw-shortcode-element-sidebar_id', 'label' => $this->get_label('Select sidebar'), 'parse' => $source, 'options' => $this->settings['otw_sidebars_options'], 'value' => $this->settings['default_otw_sidebar'])); return $html; }
/** * Shortcode admin interface */ public function build_shortcode_editor_options() { $html = ''; $source = array(); if (isset($_POST['shortcode_object'])) { $source = $_POST['shortcode_object']; } $html .= OTW_Form::select(array('id' => 'otw-shortcode-element-tabs', 'label' => $this->get_label('Number'), 'description' => $this->get_label('Select number of tabs.'), 'parse' => $source, 'options' => $this->settings['tabs'], 'value' => $this->settings['default_tabs'], 'data-reload' => '1')); $html .= OTW_Form::select(array('id' => 'otw-shortcode-element-style', 'label' => $this->get_label('Style'), 'description' => $this->get_label('Horizontal or vertical tabs.'), 'parse' => $source, 'options' => $this->settings['styles'], 'value' => $this->settings['default_style'])); $html .= OTW_Form::text_input(array('id' => 'otw-shortcode-element-title', 'label' => $this->get_label('Tabs title'), 'description' => $this->get_label('Optional title for the tabs.'), 'parse' => $source)); $total_tabs = $this->settings['default_tabs']; if (isset($source['otw-shortcode-element-tabs'])) { $total_tabs = $source['otw-shortcode-element-tabs']; } for ($cT = 1; $cT <= $total_tabs; $cT++) { $html .= OTW_Form::text_input(array('id' => 'otw-shortcode-element-tab_' . $cT . '_title', 'label' => $this->get_label('Tab ' . $cT . ' title'), 'description' => $this->get_label('The tab title.'), 'parse' => $source)); $html .= OTW_Form::select(array('id' => 'otw-shortcode-element-tab_' . $cT . '_icon_type', 'label' => $this->get_label('Tab ' . $cT . ' icon'), 'description' => $this->get_label('Optional foundation icon that is placed before the title.'), 'parse' => $source, 'options' => $this->settings['icon_types'], 'value' => $this->settings['default_icon_type'])); $html .= OTW_Form::uploader(array('id' => 'otw-shortcode-element-tab_' . $cT . '_icon_url', 'label' => $this->get_label('Tab ' . $cT . ' Icon URL'), 'description' => $this->get_label('Url to a custom icon.'), 'parse' => $source)); $html .= OTW_Form::text_area(array('id' => 'otw-shortcode-element-tab_' . $cT . '_content', 'label' => $this->get_label('Tab ' . $cT . ' content'), 'description' => $this->get_label('The content of the tab. HTML is allowed.'), 'parse' => $source)); } return $html; }
public function build_add_column_dialog() { $content = ""; $content .= "\n<div>"; $content .= "\n<h3>" . $this->get_label('Choose column type') . "</h3>"; $content .= "\n<div class=\"otw_grid_manager_column_dlg\">"; $content .= "\n<div class=\"otw_grid_manager_column_dlg_container\">"; $content .= "\n<div class=\"otw_grid_manager_column_dlg_row\">"; $content .= "\n<div class=\"otw-twentyfour otw-columns\"><div class=\"otw-column-content otw-column-1_1\">1/1</div></div>"; $content .= "\n</div>"; $content .= "\n<div class=\"otw_grid_manager_column_dlg_row\">"; $content .= "\n<div class=\"otw-twelve otw-columns\"><div class=\"otw-column-content otw-column-1_2\">1/2</div></div>"; $content .= "\n</div>"; $content .= "\n<div class=\"otw_grid_manager_column_dlg_row\">\n\t\t\t\t<div class=\"otw-eight otw-columns\"><div class=\"otw-column-content otw-column-1_3\">1/3</div></div>\n\t\t\t\t<div class=\"otw-sixteen otw-columns\"><div class=\"otw-column-content otw-column-2_3\">2/3</div></div>\n\t\t\t</div>"; $content .= "\n<div class=\"otw_grid_manager_column_dlg_row\">\n\t\t\t\t<div class=\"otw-six otw-columns\"><div class=\"otw-column-content otw-column-1_4\">1/4</div></div>\n\t\t\t\t<div class=\"otw-eighteen otw-columns\"><div class=\"otw-column-content otw-column-3_4\">3/4</div></div>\n\t\t\t</div>"; $content .= "\n<div class=\"otw_grid_manager_column_dlg_row\">\n\t\t\t\t<div class=\"otw-four otw-columns\"><div class=\"otw-column-content otw-column-1_6\">1/6</div></div>\n\t\t\t\t<div class=\"otw-twenty otw-columns\"><div class=\"otw-column-content otw-column-5_6\">5/6</div></div>\n\t\t\t</div>"; $content .= "\n</div><div>"; $content .= "\n<h3 class=\"adv_settings\" id=\"adv_settings\">" . $this->get_label('Advanced settings') . "</h3>"; $content .= "\n<div class=\"adv_settings_container\" id=\"adv_settings_mobile_container\">"; $content .= "\n<h4 class=\"otw_mobile\"><span>" . $this->get_label('Mobile Grid') . "</span><img src=\"" . $this->component_url . "img/gm-advanced-down-arrow.png\" alt=\"\" /></h4>"; $content .= "\n<div id=\"adv_settings_mobile_content\">"; $content .= "\n<p>" . $this->get_label('The grid has two modes of adapting for small displays like phones.<br />The first requires no work at all - the grid will linearize on a small device so your columns stack vertically (all in one column). If you don’t know what you are doing leave it as is and it should be all fine.<br />The other mode can take your existing grid elements and attach them to a six column phone grid. This means you can have 1, 2 or 3 columns on mobile devices. Note that you need to have all columns in a given row set up correctly in order to make it work.<br />Here is an example of two columns in a row.<br />This is correct: 1/2 +1/2<br />This is incorrect: 2/3 + 1/2 because it is more than a full row<br />This is incorrect: 1/3 + 1/3 because it doesn’t make a full row.') . "</p>"; $content .= "\n" . OTW_Form::select(array('id' => 'otw_mobile_column_size', 'options' => $this->mobile_grid_columns)); $content .= "\n</div>"; $content .= "\n</div>"; $content .= "\n<div class=\"alignleft otw_grid_manager_column_dlg_row_buttons\">\n\t\t\t\t\t<input type=\"button\" accesskey=\"S\" value=\"" . $this->get_label('Save') . "\" name=\"save_settings\" class=\"button\" id=\"otw-shortcode-btn-save\">\n\t\t\t\t\t<input type=\"button\" accesskey=\"C\" value=\"" . $this->get_label('Cancel') . "\" name=\"cancel_settings\" class=\"button\" id=\"otw-shortcode-btn-cancel\">\n\t\t\t\t</div>"; $content .= "\n</div>"; echo $content; die; }
</div> <div class="otw-cs-sidebar-width-selection"> <div id="otw_cs_sidebar-width1_container_<?php echo $item_type; ?> "> <?php echo OTW_Form::select(array('id' => 'otw_cs_sidebar1_size_' . $item_type, 'name' => 'otw_cs_sidebar1_size_' . $item_type, 'value' => $default_values[$item_type]['sidebar1_size'], 'options' => $available_sidebar_sizes, 'label' => $this->get_label('OTW Primary Sidebar Width'), 'description' => $this->get_label('Choose the width for your Primary sidebar in columns. The whole content area including sidebars is 24 columns.'))); ?> </div> <div id="otw_cs_sidebar-width2_container_<?php echo $item_type; ?> "> <?php echo OTW_Form::select(array('id' => 'otw_cs_sidebar2_size_' . $item_type, 'name' => 'otw_cs_sidebar2_size_' . $item_type, 'value' => $default_values[$item_type]['sidebar2_size'], 'options' => $available_sidebar_sizes, 'label' => $this->get_label('OTW Secondary Sidebar Width'), 'description' => $this->get_label('Choose the width for your Secondary sidebar in columns. The whole content area including sidebars is 24 columns.'))); ?> </div> </div> </div> </div> <?php } ?> <p class="submit"> <input type="submit" value="<?php echo $this->get_label('Save Default Settings'); ?> " name="submit" class="button"/> </p>