function printAllPluginOptionsForm($inaAllPluginOptions, $insVarPrefix = '', $iOptionsPerRow = 1) { if (empty($inaAllPluginOptions)) { return; } $iRowWidth = 8; //8 spans. $iOptionWidth = $iRowWidth / $iOptionsPerRow; $sOptionValue; //Take each Options Section in turn foreach ($inaAllPluginOptions as $sOptionSection) { $sRowId = str_replace(' ', '', $sOptionSection['section_title']); //Print the Section Title echo ' <div class="row" id="' . $sRowId . '"> <div class="span9" style="margin-left:0px"> <fieldset> <legend>' . $sOptionSection['section_title'] . '</legend> '; $rowCount = 1; $iOptionCount = 0; //Print each option in the option section foreach ($sOptionSection['section_options'] as $aOption) { $iOptionCount = $iOptionCount % $iOptionsPerRow; if ($iOptionCount == 0) { echo ' <div class="row row_number_' . $rowCount . '">'; } echo getPluginOptionSpan($aOption, $iOptionWidth, $insVarPrefix); $iOptionCount++; if ($iOptionCount == $iOptionsPerRow) { echo ' </div> <!-- / options row -->'; $rowCount++; } } //foreach option echo ' </fieldset> </div> </div> '; /* //ensure the intermediate save button is not printed at the end. end($inaAllPluginOptions); $skey = key($inaAllPluginOptions); if ( $sOptionSection['section_title'] != $skey ) { echo ' <div class="form-actions"> <button type="submit" class="btn btn-primary" name="submit" '.($hlt_compiler_enabled ? '':' disabled').'>'. _hlt__( 'Save All Settings' ).'</button> </div> '; } */ } //foreach section }
function printAllPluginOptionsForm($inaAllPluginOptions, $insVarPrefix = '', $nOptionsPerRow = 1) { if (empty($inaAllPluginOptions)) { return; } $nRowWidth = 8; //8 spans. $iOptionWidth = $nRowWidth / $nOptionsPerRow; //Take each Options Section in turn foreach ($inaAllPluginOptions as $nSection => $sOptionSection) { $sRowId = str_replace(' ', '', $sOptionSection['section_title']); //Print the Section Title echo ' <div class="row" id="' . $sRowId . '"> <div class="span9" style="margin-left:0px"> <fieldset> <legend>' . $sOptionSection['section_title'] . '</legend> '; $nRowCount = 1; $nOptionCount = 0; $iOptionWidth = $nSection === 0 ? $nRowWidth : $nRowWidth / $nOptionsPerRow; //Print each option in the option section foreach ($sOptionSection['section_options'] as $aOption) { $nOptionCount = $nOptionCount % $nOptionsPerRow; if ($nOptionCount == 0) { echo ' <div class="row row_number_' . $nRowCount . '">'; } echo getPluginOptionSpan($aOption, $iOptionWidth, $insVarPrefix); $nOptionCount++; if ($nOptionCount == $nOptionsPerRow) { echo ' </div> <!-- / options row -->'; $nRowCount++; } } //foreach option echo ' </fieldset> </div> </div> '; } }
function printAllPluginOptionsFormTabs($aAllOptions, $var_prefix = '', $iOptionsPerRow = 1) { if (empty($aAllOptions)) { return; } $iOptionWidth = 8 / $iOptionsPerRow; //8 spans. ?> <ul class="nav nav-tabs"> <?php foreach ($aAllOptions as $sOptionSection) { ?> <li class="<?php echo $sOptionSection['section_primary'] ? 'active' : ''; ?> "> <a href="#<?php echo $sOptionSection['section_slug']; ?> " data-toggle="tab" ><?php echo $sOptionSection['section_title_short']; ?> </a> </li> <?php } ?> </ul> <div class="tab-content"> <?php foreach ($aAllOptions as $sOptionSection) { ?> <div class="tab-pane fade <?php echo $sOptionSection['section_primary'] ? 'active in primary_section' : 'non_primary_section'; ?> " id="<?php echo $sOptionSection['section_slug']; ?> "> <div class="row option_section_row <?php echo $sOptionSection['section_primary'] ? 'primary_section' : 'non_primary_section'; ?> " id="row-<?php echo $sOptionSection['section_slug']; ?> "> <div class="span9"> <fieldset> <legend><?php echo $sOptionSection['section_title']; ?> </legend> <?php if (!empty($sOptionSection['section_summary'])) { ?> <div class="row row_section_summary"> <div class="span9"> <?php foreach ($sOptionSection['section_summary'] as $sItem) { ?> <p class="noselect"><?php echo $sItem; ?> </p> <?php } ?> </div> </div> <?php } ?> <?php foreach ($sOptionSection['section_options'] as $nKeyRow => $aOption) { ?> <div class="row row_number_<?php echo $nKeyRow; ?> "> <?php getPluginOptionSpan($aOption, $iOptionWidth, $var_prefix); ?> </div> <?php } ?> </fieldset> </div> </div> </div> <?php } ?> </div> <?php }