diff --git a/e107_handlers/admin_ui.php b/e107_handlers/admin_ui.php index 703920c02..5d32adee0 100644 --- a/e107_handlers/admin_ui.php +++ b/e107_handlers/admin_ui.php @@ -4357,6 +4357,22 @@ class e_admin_ui extends e_admin_controller_ui + } + + if(!empty($config['batchOptions'])) + { + $opts = array(); + foreach($config['batchOptions'] as $k=>$v) + { + $fieldName = 'batch_'.$plug.'_'.$k; + + $opts[$fieldName] = $v; // ie. x_plugin_key + + } + + $batchCat = deftrue('LAN_PLUGIN_'.strtoupper($plug).'_NAME', $plug); + $this->batchOptions[$batchCat] = $opts; + } if(!empty($config['tabs'])) @@ -6266,7 +6282,22 @@ class e_admin_form_ui extends e_form { foreach($customBatchOptions as $key=>$val) { - $text .= $this->option($val, $key, false, array('class' => 'ui-batch-option class', 'other' => 'style="padding-left: 15px"')); + + if(is_array($val)) + { + $text .= $this->optgroup_open($key); + foreach($val as $k=>$v) + { + $text .= $this->option($v, $k, false, array('class' => 'ui-batch-option class', 'other' => 'style="padding-left: 15px"')); + } + $text .= $this->optgroup_close(); + } + else + { + $text .= $this->option($val, $key, false, array('class' => 'ui-batch-option class', 'other' => 'style="padding-left: 15px"')); + } + + } } diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 342518413..e70b7ff51 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -3923,7 +3923,7 @@ class e_form if(!$value) $value = '0'; if($parms) { - if(!isset($parms['sep'])) $value = number_format($value, $parms['decimals']); + if(!isset($parms['sep'])) $value = number_format($value, varset($parms['decimals'],0)); else $value = number_format($value, $parms['decimals'], vartrue($parms['point'], '.'), vartrue($parms['sep'], ' ')); }