diff options
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/local/www/classes/Form/Group.class.php | 8 | ||||
-rw-r--r-- | src/usr/local/www/classes/Form/Input.class.php | 10 |
2 files changed, 17 insertions, 1 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..1218728 100644 --- a/src/usr/local/www/classes/Form/Group.class.php +++ b/src/usr/local/www/classes/Form/Group.class.php @@ -130,7 +130,13 @@ EOT; foreach ($missingWidth as $input) $input->setWidth($spaceLeft / count($missingWidth)); - $target = $this->_labelTarget->getId(); + if (strtolower($this->_labelTarget->get_Type()) == 'hidden') + $hidden = true; + + $form_controls = array('input', 'select', 'button', 'textarea', 'option', 'optgroup', 'fieldset', 'label'); + if (in_array(strtolower($this->_labelTarget->gettagName()), $form_controls) && !$hidden) + $target = $this->_labelTarget->getId(); + $inputs = implode('', $this->_inputs); $help = $this->_getHelp(); diff --git a/src/usr/local/www/classes/Form/Input.class.php b/src/usr/local/www/classes/Form/Input.class.php index af04b82..80b96c8 100644 --- a/src/usr/local/www/classes/Form/Input.class.php +++ b/src/usr/local/www/classes/Form/Input.class.php @@ -85,6 +85,16 @@ class Form_Input extends Form_Element return $this->_attributes['id']; } + public function get_Type() + { + return $this->_attributes['type']; + } + + public function gettagName() + { + return $this->_tagName; + } + public function setHelp($help, array $params = array()) { $this->_help = $help; |