summaryrefslogtreecommitdiff
path: root/inc/Form/InputElement.php
diff options
context:
space:
mode:
authorGuy Brand <gb@unistra.fr>2015-08-23 15:54:03 +0200
committerGuy Brand <gb@unistra.fr>2015-08-23 15:54:03 +0200
commitd1c5a21205ecdf83c4cbdcd9245556121688e798 (patch)
treef99aacf8e4e2aad00b106d9b905a14c3536ba935 /inc/Form/InputElement.php
parent2beabe635c6b98fcf412ba42d137a5de33543109 (diff)
parent0f0d29909c63f9897c9c003e6d3e3b8381a6f36d (diff)
downloadrpg-d1c5a21205ecdf83c4cbdcd9245556121688e798.tar.gz
rpg-d1c5a21205ecdf83c4cbdcd9245556121688e798.tar.bz2
Merge branch 'master' into stable
Diffstat (limited to 'inc/Form/InputElement.php')
-rw-r--r--inc/Form/InputElement.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/inc/Form/InputElement.php b/inc/Form/InputElement.php
index 5908f7d11..694dd0848 100644
--- a/inc/Form/InputElement.php
+++ b/inc/Form/InputElement.php
@@ -12,7 +12,7 @@ namespace dokuwiki\Form;
*/
class InputElement extends Element {
/**
- * @var Label
+ * @var LabelElement
*/
protected $label = null;
@@ -24,18 +24,19 @@ class InputElement extends Element {
/**
* @param string $type The type of this element
* @param string $name The name of this form element
- * @param string $label The label text for this element
+ * @param string $label The label text for this element (will be autoescaped)
*/
public function __construct($type, $name, $label = '') {
parent::__construct($type, array('name' => $name));
$this->attr('name', $name);
- if($label) $this->label = new Label($label);
+ $this->attr('type', $type);
+ if($label) $this->label = new LabelElement($label);
}
/**
* Returns the label element if there's one set
*
- * @return Label|null
+ * @return LabelElement|null
*/
public function getLabel() {
return $this->label;