diff options
Diffstat (limited to 'libs/HTML/QuickForm2/Element')
-rw-r--r-- | libs/HTML/QuickForm2/Element/Date.php | 8 | ||||
-rw-r--r-- | libs/HTML/QuickForm2/Element/InputCheckable.php | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/libs/HTML/QuickForm2/Element/Date.php b/libs/HTML/QuickForm2/Element/Date.php index 6a3dca2429..04b59fe547 100644 --- a/libs/HTML/QuickForm2/Element/Date.php +++ b/libs/HTML/QuickForm2/Element/Date.php @@ -171,14 +171,18 @@ class HTML_QuickForm2_Element_Date extends HTML_QuickForm2_Container_Group $this->data['maxYear'], $this->data['minYear'] > $this->data['maxYear']? -1: 1 ); - array_walk($options, create_function('&$v,$k','$v = substr($v,-2);')); + array_walk($options, function (&$v, $k) { + $v = substr($v, -2); + }); break; case 'h': $options = $this->createOptionList(1, 12); break; case 'g': $options = $this->createOptionList(1, 12); - array_walk($options, create_function('&$v,$k', '$v = intval($v);')); + array_walk($options, function (&$v, $k) { + $v = intval($v); + }); break; case 'H': $options = $this->createOptionList(0, 23); diff --git a/libs/HTML/QuickForm2/Element/InputCheckable.php b/libs/HTML/QuickForm2/Element/InputCheckable.php index 9a152ec7c3..82332b4cb1 100644 --- a/libs/HTML/QuickForm2/Element/InputCheckable.php +++ b/libs/HTML/QuickForm2/Element/InputCheckable.php @@ -153,9 +153,7 @@ class HTML_QuickForm2_Element_InputCheckable extends HTML_QuickForm2_Element_Inp } elseif ($this->frozen) { $label = $this->data['content']; } else { - $label = '<label for="' . htmlspecialchars( - $this->getId(), ENT_QUOTES, self::getOption('charset') - ) . '">' . $this->data['content'] . '</label>'; + return '<label>' . parent::__toString() . '<span>' . $this->data['content'] . '</span></label>'; } return parent::__toString() . $label; } |