*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*/
}
function showForm() {
- global $wgOut, $wgUser, $wgRequest;
+ global $wgOut, $wgUser, $wgRequest, $wgLivePasswordStrengthChecks;
+ if ( $wgLivePasswordStrengthChecks ) {
+ $wgOut->addPasswordSecurity( 'wpNewPassword', 'wpRetype' );
+ }
$self = $this->getTitle();
if ( !$this->mUserName ) {
$this->mUserName = $wgUser->getName();
wfMsgExt( 'resetpass_text', array( 'parse' ) ) . "\n" .
Xml::openElement( 'table', array( 'id' => 'mw-resetpass-table' ) ) . "\n" .
$this->pretty( array(
- array( 'wpName', 'username', 'text', $this->mUserName ),
- array( 'wpPassword', $oldpassMsg, 'password', $this->mOldpass ),
- array( 'wpNewPassword', 'newpassword', 'password', null ),
- array( 'wpRetype', 'retypenew', 'password', null ),
+ array( 'wpName', 'username', 'text', $this->mUserName, '' ),
+ array( 'wpPassword', $oldpassMsg, 'password', $this->mOldpass, '' ),
+ array( 'wpNewPassword', 'newpassword', 'password', null, '<div id="password-strength"></div>' ),
+ array( 'wpRetype', 'retypenew', 'password', null, '<div id="password-retype"></div>' ),
) ) . "\n" .
$rememberMe .
"<tr>\n" .
function pretty( $fields ) {
$out = '';
foreach ( $fields as $list ) {
- list( $name, $label, $type, $value ) = $list;
+ list( $name, $label, $type, $value, $extra ) = $list;
if( $type == 'text' ) {
$field = htmlspecialchars( $value );
} else {
else
$out .= wfMsgHtml( $label );
$out .= "</td>\n";
- $out .= "\t<td class='mw-input'>";
- $out .= $field;
- $out .= "</td>\n";
+ $out .= "\t<td class='mw-input'>$field</td>\n";
+ $out .= "\t<td>$extra</td>\n";
$out .= "</tr>";
}
return $out;