From 1ef5b8c1916322fec2d36377c4772c76cb8850f9 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Sun, 6 Sep 2009 15:07:29 +0000 Subject: [PATCH] Reimplement r55876 properly --- includes/HTMLForm.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index 1db26fe37a..b86c882193 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -525,7 +525,12 @@ class HTMLTextField extends HTMLFormField { function getInputHTML( $value ) { global $wgHtml5; - $attribs = array( 'id' => $this->mID ); + $attribs = array( + 'id' => $this->mID, + 'name' => $this->mName, + 'size' => $this->getSize(), + 'value' => $value, + ); if ( isset( $this->mParams['maxlength'] ) ) { $attribs['maxlength'] = $this->mParams['maxlength']; @@ -562,23 +567,18 @@ class HTMLTextField extends HTMLFormField { $attribs['type'] = 'number'; $attribs['step'] = 'any'; break; + case 'password': + $attribs['type'] = 'password'; + break; } } } - $func = $this->mFunction; - return Xml::$func( - $this->mName, - $this->getSize(), - $value, - $attribs - ); + return Html::element( 'input', $attribs ); } } -class HTMLPasswordField extends HTMLTextField { - protected $mFunction = 'password'; -} +class HTMLPasswordField extends HTMLTextField {} class HTMLFloatField extends HTMLTextField { function getSize() { -- 2.20.1