Fixed issue with setup block checkbox generator
This commit is contained in:
parent
c16d55995b
commit
a7188a452b
1 changed files with 8 additions and 4 deletions
|
@ -184,15 +184,19 @@ class SetupBlock extends Block
|
|||
global $config;
|
||||
$checked = $config->get_bool($name) ? " checked" : "";
|
||||
|
||||
$html = "<input type='checkbox' id='$name' name='_config_$name'$checked>\n";
|
||||
if (!is_null($label)) {
|
||||
$html = "";
|
||||
if(!$table_row&&!is_null($label)) {
|
||||
$html .= "<label for='{$name}'>{$label}</label>";
|
||||
}
|
||||
|
||||
$html .= "<input type='checkbox' id='$name' name='_config_$name'$checked>\n";
|
||||
if ($table_row && !is_null($label)) {
|
||||
$html .= "<label for='{$name}'>{$label}</label>";
|
||||
$label = null;
|
||||
}
|
||||
|
||||
$html .= "<input type='hidden' name='_type_$name' value='bool'>\n";
|
||||
|
||||
$this->format_option($name, $html, $label, $table_row);
|
||||
$this->format_option($name, $html, null, $table_row);
|
||||
}
|
||||
|
||||
// public function add_hidden_option($name, $label=null) {
|
||||
|
|
Reference in a new issue