diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/Form/Element.php | 1 | ||||
-rw-r--r-- | inc/Form/Form.php | 6 | ||||
-rw-r--r-- | inc/Form/InputElement.php | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/inc/Form/Element.php b/inc/Form/Element.php index 6f23e2631..3fd170a80 100644 --- a/inc/Form/Element.php +++ b/inc/Form/Element.php @@ -101,6 +101,7 @@ abstract class Element { $classes = explode(' ', $this->attr('class')); $classes[] = $class; $classes = array_unique($classes); + $classes = array_filter($classes); $this->attr('class', join(' ', $classes)); return $this; } diff --git a/inc/Form/Form.php b/inc/Form/Form.php index 3a8b590e7..dc502e021 100644 --- a/inc/Form/Form.php +++ b/inc/Form/Form.php @@ -34,7 +34,7 @@ class Form extends Element { if(!$this->attr('action')) { $get = $_GET; if(isset($get['id'])) unset($get['id']); - $self = wl($ID, $get); + $self = wl($ID, $get, false, '&'); //attributes are escaped later $this->attr('action', $self); } @@ -51,8 +51,8 @@ class Form extends Element { // add the security token by default $this->setHiddenField('sectok', getSecurityToken()); - // identify this as a form2 based form in HTML - $this->addClass('doku_form2'); + // identify this as a new form based form in HTML + $this->addClass('doku_form'); } /** diff --git a/inc/Form/InputElement.php b/inc/Form/InputElement.php index 59310174e..4f644c0f1 100644 --- a/inc/Form/InputElement.php +++ b/inc/Form/InputElement.php @@ -28,6 +28,7 @@ class InputElement extends Element { public function __construct($type, $name, $label) { parent::__construct($type, array('name' => $name)); $this->attr('name', $name); + $this->label = new Label($label); } /** |