diff options
Diffstat (limited to 'src')
4 files changed, 9 insertions, 4 deletions
diff --git a/src/usr/local/www/classes/Form/Checkbox.class.php b/src/usr/local/www/classes/Form/Checkbox.class.php index 0601779..af258a4 100644 --- a/src/usr/local/www/classes/Form/Checkbox.class.php +++ b/src/usr/local/www/classes/Form/Checkbox.class.php @@ -63,7 +63,7 @@ class Form_Checkbox extends Form_Input { $input = parent::_getInput(); - if (!isset($this->_description)) + if (empty($this->_description)) return $input; return '<label class="chkboxlbl">'. $input .' '. htmlspecialchars(gettext($this->_description)) .'</label>'; diff --git a/src/usr/local/www/classes/Form/Group.class.php b/src/usr/local/www/classes/Form/Group.class.php index ce11969..d07010a 100644 --- a/src/usr/local/www/classes/Form/Group.class.php +++ b/src/usr/local/www/classes/Form/Group.class.php @@ -86,7 +86,7 @@ class Form_Group extends Form_Element protected function _getHelp() { - if (!isset($this->_help)) + if (empty($this->_help)) return null; $group = new Form_Element; diff --git a/src/usr/local/www/classes/Form/Input.class.php b/src/usr/local/www/classes/Form/Input.class.php index 4cdfb28..f146e1b 100644 --- a/src/usr/local/www/classes/Form/Input.class.php +++ b/src/usr/local/www/classes/Form/Input.class.php @@ -243,7 +243,7 @@ class Form_Input extends Form_Element if (!isset($this->_help) && '<div>' == $column) return (string)$input; - if (isset($this->_help)) + if (!empty($this->_help)) { /* Strings longer than this will break gettext. */ if (strlen($this->_help) < 7620) { diff --git a/src/usr/local/www/classes/Form/Section.class.php b/src/usr/local/www/classes/Form/Section.class.php index 631562c..f1c00c9 100644 --- a/src/usr/local/www/classes/Form/Section.class.php +++ b/src/usr/local/www/classes/Form/Section.class.php @@ -92,7 +92,12 @@ class Form_Section extends Form_Element public function __toString() { $element = parent::__toString(); - $title = htmlspecialchars(gettext($this->_title)); + + if (!empty(trim($this->_title)) || is_numeric($this->_title)) + $title = htmlspecialchars(gettext($this->_title)); + else + $title = ''; + $body = implode('', $this->_groups); $hdricon = ""; $bodyclass = '<div class="panel-body">'; |