summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/usr/local/www/classes/Form/Group.class.php5
-rw-r--r--src/usr/local/www/system.php11
2 files changed, 16 insertions, 0 deletions
diff --git a/src/usr/local/www/classes/Form/Group.class.php b/src/usr/local/www/classes/Form/Group.class.php
index 4ddf70d..ac4da7e 100644
--- a/src/usr/local/www/classes/Form/Group.class.php
+++ b/src/usr/local/www/classes/Form/Group.class.php
@@ -108,6 +108,8 @@ EOT;
public function __toString()
{
+ global $config;
+
$element = parent::__toString();
// Automatically determine width for inputs without explicit set
@@ -134,6 +136,9 @@ EOT;
$inputs = implode('', $this->_inputs);
$help = $this->_getHelp();
+ if (!isset($config['system']['webgui']['webguileftcolumnhyper']))
+ $target = null;
+
$label = new Form_Element('label', false, ['for' => $target]);
$label->addClass('col-sm-'.Form::LABEL_WIDTH, 'control-label');
diff --git a/src/usr/local/www/system.php b/src/usr/local/www/system.php
index 30b76a8..70a6b79 100644
--- a/src/usr/local/www/system.php
+++ b/src/usr/local/www/system.php
@@ -92,6 +92,7 @@ $pconfig['language'] = $config['system']['language'];
$pconfig['webguicss'] = $config['system']['webgui']['webguicss'];
$pconfig['webguifixedmenu'] = $config['system']['webgui']['webguifixedmenu'];
$pconfig['dashboardcolumns'] = $config['system']['webgui']['dashboardcolumns'];
+$pconfig['webguileftcolumnhyper'] = isset($config['system']['webgui']['webguileftcolumnhyper']);
$pconfig['dnslocalhost'] = isset($config['system']['dnslocalhost']);
if (!$pconfig['timezone']) {
@@ -231,6 +232,9 @@ if ($_POST) {
set_language($config['system']['language']);
}
+ unset($config['system']['webgui']['webguileftcolumnhyper']);
+ $config['system']['webgui']['webguileftcolumnhyper'] = $_POST['webguileftcolumnhyper'] ? true : false;
+
/* XXX - billm: these still need updating after figuring out how to check if they actually changed */
$olddnsservers = $config['system']['dnsserver'];
unset($config['system']['dnsserver']);
@@ -502,6 +506,13 @@ $section->addInput(new Form_Input(
[min => 1, max => 4]
))->setHelp('<span class="badge" title="This feature is in BETA">BETA</span>');
+$section->addInput(new Form_Checkbox(
+ 'webguileftcolumnhyper',
+ 'Left Column Labels',
+ 'Active',
+ $pconfig['webguileftcolumnhyper']
+))->setHelp('If selected, clicking a label in the left column will select/toggle the first item of the group.');
+
$form->add($section);
print $form;
OpenPOWER on IntegriCloud