Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #13 from chrismou/master

Change text input type from chrismou
  • Loading branch information...
commit f8d9260f2015529108f8dfbf59084a6512a38fc9 2 parents 7074fa1 + 42ffd21
@jimmyff jimmyff authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 classes/widgets/form/elements/widget_TextElement.php
View
6 classes/widgets/form/elements/widget_TextElement.php
@@ -14,7 +14,10 @@ class widget_TextElement extends widget_AbstractElement {
public function __construct($args) {
if (array_key_exists('placeholder', $args) && strlen($args['placeholder']))
$this->placeholder = $args['placeholder'];
-
+
+ if (array_key_exists('type', $args) && strlen($args['type']))
+ $this->htmlType = $args['type'];
+
if (array_key_exists('onChange', $args) && strlen($args['onChange']))
$this->onChange = $args['onChange'];
@@ -44,6 +47,7 @@ function renderElement() {
!is_null($this->onBlur) && strlen($this->onBlur)?sf(' onBlur="%s"', $this->onBlur):''
));
}
+
}
?>
Please sign in to comment.
Something went wrong with that request. Please try again.