'int' => 'HTMLIntField',
'float' => 'HTMLFloatField',
'info' => 'HTMLInfoField',
+ 'password' => 'HTMLPasswordField',
'selectorother' => 'HTMLSelectOrOtherField',
# HTMLTextField will output the correct type="" attribute automagically.
# There are about four zillion other HTML 5 input types, like url, but
}
class HTMLTextField extends HTMLFormField {
+ # Override in derived classes to use other Xml::... functions
+ protected $mFunction = 'input';
+
function getSize() {
return isset( $this->mParams['size'] ) ? $this->mParams['size'] : 45;
}
}
}
- return Xml::input(
+ $func = $this->mFunction;
+ return Xml::$func(
$this->mName,
$this->getSize(),
$value,
}
}
+class HTMLPasswordField extends HTMLTextField {
+ protected $mFunction = 'password';
+}
+
class HTMLFloatField extends HTMLTextField {
function getSize() {
return isset( $this->mParams['size'] ) ? $this->mParams['size'] : 20;