$this->tableRow( Xml::element( 'h2', null, wfMsg( 'changepassword' ) ) ) .
$this->tableRow(
Xml::label( wfMsg( 'oldpassword' ), 'wpOldpass' ),
- Xml::input( 'wpOldpass', 25, $this->mOldpass, array( 'id' => 'wpOldpass' ) )
+ Xml::password( 'wpOldpass', 25, $this->mOldpass, array( 'id' => 'wpOldpass' ) )
) .
$this->tableRow(
Xml::label( wfMsg( 'newpassword' ), 'wpNewpass' ),
- Xml::input( 'wpNewpass', 25, $this->mNewpass, array( 'id' => 'wpNewpass' ) )
+ Xml::password( 'wpNewpass', 25, $this->mNewpass, array( 'id' => 'wpNewpass' ) )
) .
$this->tableRow(
Xml::label( wfMsg( 'retypenew' ), 'wpRetypePass' ),
- Xml::input( 'wpRetypePass', 25, $this->mRetypePass, array( 'id' => 'wpRetypePass' ) )
+ Xml::password( 'wpRetypePass', 25, $this->mRetypePass, array( 'id' => 'wpRetypePass' ) )
) .
Xml::tags( 'tr', null,
Xml::tags( 'td', array( 'colspan' => '2' ),
'value' => $value ) + $attribs );
}
+ /**
+ * Convenience function to build an HTML password input field
+ * @return string HTML
+ */
+ public static function password( $name, $size=false, $value=false, $attribs=array() ) {
+ return self::input( $name, $size, $value, array_merge($attribs, array('type' => 'password')));
+ }
+
/**
* Internal function for use in checkboxes and radio buttons and such.
* @return array