r104131 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104130‎ | r104131 | r104132 >
Date:02:35, 24 November 2011
Author:preilly
Status:deferred (Comments)
Tags:mobile 
Comment:
use HTMLForm
Modified paths:
  • /trunk/extensions/MobileFrontend/MobileFrontend.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/MobileFrontend.php
@@ -1075,6 +1075,20 @@
10761076 $username = self::$messages['mobile-frontend-username'];
10771077 $password = self::$messages['mobile-frontend-password'];
10781078 $login = self::$messages['mobile-frontend-login'];
 1079+ $loginHtml = Html::input( 'wpName', $this->data['name'], 'text', array(
 1080+ 'class' => 'loginText',
 1081+ 'id' => 'wpName1',
 1082+ 'tabindex' => '1',
 1083+ 'size' => '20',
 1084+ 'required') );
 1085+ $passwordHtml = Html::input( 'wpPassword', null, 'password', array(
 1086+ 'class' => 'loginPassword',
 1087+ 'id' => 'wpPassword1',
 1088+ 'tabindex' => '2',
 1089+ 'size' => '20') );
 1090+ $buttonHtml = Html::input( 'wpLoginAttempt', $login, 'submit', array(
 1091+ 'id' => 'wpLoginAttempt',
 1092+ 'tabindex' => '3') );
10791093 $form = <<<EOT
10801094 <form name="userlogin" method="post" action="{$action}">
10811095 <table class="user-login">
@@ -1083,19 +1097,19 @@
10841098 <td class="mw-label"><label for="wpName1">{$username}</label></td>
10851099 </tr>
10861100 <tr>
1087 - <td class="mw-input"><input class="loginText" id="wpName1" tabindex="1" size="20" value="" name="wpName"></td>
 1101+ <td class="mw-input">{$loginHtml}</td>
10881102 </tr>
10891103 <tr>
10901104 <td class="mw-label"><label for="wpPassword1">{$password}</label></td>
10911105 </tr>
10921106 <tr>
1093 - <td class="mw-input"><input class="loginPassword" id="wpPassword1" tabindex="2" size="20" autofocus="" type="password" name="wpPassword"></td>
 1107+ <td class="mw-input">{$passwordHtml}</td>
10941108 </tr>
10951109 <tr>
10961110 <td></td>
10971111 </tr>
10981112 <tr>
1099 - <td class="mw-submit"><input id="wpLoginAttempt" tabindex="9" type="submit" value="{$login}" name="wpLoginAttempt"></td>
 1113+ <td class="mw-submit">{$buttonHtml}</td>
11001114 </tr>
11011115 </tbody>
11021116 </table>

Follow-up revisions

RevisionCommit summaryAuthorDate
r104132remove data referencepreilly02:37, 24 November 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r104128provide login supportpreilly02:02, 24 November 2011

Comments

#Comment by MZMcBride (talk | contribs)   02:49, 24 November 2011

I don't think this is HTMLForm. http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/HTMLForm.php?revision=103294&view=markup is HTMLForm. It builds the whole form for you. I'll leave some expanded comments at r104128.

Status & tagging log