From af7b20570c9df15c1ee059cccb21acaee2119957 Mon Sep 17 00:00:00 2001 From: Matthew Flaschen Date: Fri, 5 Apr 2013 21:57:03 -0400 Subject: [PATCH] Create account form with vertical form appearance Similar to the login form (change 55847), this presents a compact vertically-stacked form, if a global variable is set or if you add ?useNew=1 to the query string. The redesigned create account form also: * Removes the remember me checkbox (see bugzilla 47267) * Displays some wiki statistics in a benefits column. * Repositions the FancyCaptcha image if present using JavaScript (see bugzilla 47372). * Sets the template skin as in change 59577. Bug: 44628 Bug: 47267 Change-Id: I9b03d519af43de147bff0ac509a1154f67cd3a0a --- RELEASE-NOTES-1.22 | 11 +- includes/AutoLoader.php | 1 + includes/DefaultSettings.php | 16 +- includes/specials/SpecialUserlogin.php | 21 +- includes/templates/UsercreateVForm.php | 291 ++++++++++++++++++ languages/messages/MessagesEn.php | 25 ++ languages/messages/MessagesQqq.php | 27 +- maintenance/language/messages.inc | 25 ++ resources/Resources.php | 16 + .../images/icon-contributors.png | Bin 0 -> 4043 bytes .../mediawiki.special/images/icon-edits.png | Bin 0 -> 3748 bytes .../mediawiki.special/images/icon-pages.png | Bin 0 -> 3447 bytes .../mediawiki.special.createAccount.vform.css | 98 ++++++ .../mediawiki.special.createAccount.vform.js | 75 +++++ .../mediawiki.special.vforms.css | 9 + 15 files changed, 604 insertions(+), 11 deletions(-) create mode 100644 includes/templates/UsercreateVForm.php create mode 100644 resources/mediawiki.special/images/icon-contributors.png create mode 100644 resources/mediawiki.special/images/icon-edits.png create mode 100644 resources/mediawiki.special/images/icon-pages.png create mode 100644 resources/mediawiki.special/mediawiki.special.createAccount.vform.css create mode 100644 resources/mediawiki.special/mediawiki.special.createAccount.vform.js diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index 0e2f1da9cc..2dea3b5e40 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -12,7 +12,8 @@ production. * $wgRedirectScript was removed. It was unused. * Removed $wgLocalMessageCacheSerialized, it is now always true. * When $wgUseVFormUserLogin is true, the redesign of Special:UserLogin is - activated. + activated; when $wgUseVFormCreateAccount is true, the redesign of + Special:UserLogin/signup is activated. * $wgVectorUseIconWatch is now enabled by default. === New features in 1.22 === @@ -24,8 +25,12 @@ production. preference). This feature was moved from the Vector extension, and is now part of core for all skins. Take care when upgrading that you don't use an older version of the Vector extension as this feature may conflict. -* New version of Special:UserLogin form. It is opt-in for now, controlled by - the $wgUseVFormUserLogin setting or a 'useNew' URL parameter trigger. +* New 'mediawiki.ui' CSS module providing mw-ui-* styles for buttons and a + compact vertical form layout. +* New versions of login (Special:UserLogin) and create account + (Special:UserLogin/signup) forms. They are opt-in for now, controlled by + the $wgUseVFormUserLogin and $wgUseVFormCreateAccount settings or a 'useNew' + URL parameter trigger. * (bug 23343) Implemented ability to apply IP blocks to the contents of X-Forwarded-For headers by adding a new configuration variable $wgApplyIpBlocksToXff (disabled by default). * The new hook 'APIGetPossibleErrors' to modify the list of possible errors was diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index daa5fcb827..4813d45aca 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -1008,6 +1008,7 @@ $wgAutoloadLocalClasses = array( 'UserloginTemplate' => 'includes/templates/Userlogin.php', 'UserloginTemplateVForm' => 'includes/templates/UserloginVForm.php', 'UsercreateTemplate' => 'includes/templates/Usercreate.php', + 'UsercreateTemplateVForm' => 'includes/templates/UsercreateVForm.php', # includes/upload 'UploadBase' => 'includes/upload/UploadBase.php', diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index da2f321006..c19808118b 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -2829,12 +2829,22 @@ $wgVectorUseSimpleSearch = true; $wgVectorUseIconWatch = true; /** - * Use VForm design for Special:Userlogin. This can be overridden by - * a useNew bool in the query string. For instance, if it is globally - * false, you can try it with useNew=1. + * Use compact vertical form ("VForm") design for Special:Userlogin. This can + * be overridden by a useNew bool in the query string. For instance, if it is + * globally false, you can try it with useNew=1. + * + * @since 1.22 */ $wgUseVFormUserLogin = false; +/** + * Use compact vertical form ("VForm") design for account creation + * (Special:Userlogin?type=signup). + * + * @since 1.22 + */ +$wgUseVFormCreateAccount = false; + /** * Display user edit counts in various prominent places. */ diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index f7e4d0a62f..624975eb75 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -1023,10 +1023,10 @@ class LoginForm extends SpecialPage { * @return Boolean */ private function shouldShowVForm() { - global $wgUseVFormUserLogin; + global $wgUseVFormCreateAccount, $wgUseVFormUserLogin; if ( $this->mType == 'signup' ) { - return false; + return $this->mRequest->getBool( 'useNew', $wgUseVFormCreateAccount ); } else { return $this->mRequest->getBool( 'useNew', $wgUseVFormUserLogin ); } @@ -1070,11 +1070,24 @@ class LoginForm extends SpecialPage { } if ( $this->mType == 'signup' ) { - $template = new UsercreateTemplate(); + $out->addModules( 'mediawiki.special.userlogin.signup' ); + if ( $this->mShowVForm ) { + $template = new UsercreateTemplateVForm(); + $out->addModuleStyles( array( + 'mediawiki.ui', + 'mediawiki.special.createaccount.vform' + ) ); + // XXX hack pending RL or JS parse() support for complex content messages + // https://bugzilla.wikimedia.org/show_bug.cgi?id=25349 + $out->addJsConfigVars( 'wgCreateacctImgcaptchaHelp', + $this->msg( 'createacct-imgcaptcha-help' )->parse() ); + $out->addModules( 'mediawiki.special.createaccount.vform.js' ); + } else { + $template = new UsercreateTemplate(); + } $q = 'action=submitlogin&type=signup'; $linkq = 'type=login'; $linkmsg = 'gotaccount'; - $out->addModules( 'mediawiki.special.userlogin.signup' ); } else { if ( $this->mShowVForm ) { $template = new UserloginTemplateVForm(); diff --git a/includes/templates/UsercreateVForm.php b/includes/templates/UsercreateVForm.php new file mode 100644 index 0000000000..0472b8d63b --- /dev/null +++ b/includes/templates/UsercreateVForm.php @@ -0,0 +1,291 @@ +data['extraInput'][] = array( + 'name' => $name, + 'value' => $value, + 'type' => $type, + 'msg' => $msg, + 'helptext' => $helptext, + ); + } + + function execute() { + global $wgCookieExpiration; + $expirationDays = ceil( $wgCookieExpiration / ( 3600 * 24 ) ); +?> +
+ haveData( 'languages' ) ) { + ?> + + +
+

msg( 'createacct-join' ); ?>

+
+
+ html( 'header' ); /* extensions such as ConfirmEdit add form HTML here */ ?> +
+ data['message'] ) { +?> +
+ data['messagetype'] == 'error' ) { ?> + msg( 'loginerror' )?>
+ + html( 'message' ); ?> +
+ +
+ + data['name'], 'text', array( + 'class' => 'mw-input loginText', + 'id' => 'wpName2', + 'tabindex' => '1', + 'size' => '20', + 'required', + 'placeholder' => $this->getMsg( 'userlogin-yourname-ph' )->text(), + 'autofocus' + ) ); ?> +
+
+ data['createemail'] ) { ?> + + +
+
+ + 'mw-input loginPassword', + 'id' => 'wpPassword2', + 'tabindex' => '3', + 'size' => '20', + 'required', + 'placeholder' => $this->getMsg( 'createacct-yourpassword-ph' )->text() + ) + User::passwordChangeInputAttribs() ); ?> +
+ data['usedomain'] ) { + $doms = ""; + foreach ( $this->data['domainnames'] as $dom ) { + $doms .= ""; + } + ?> +
+ +
+ +
+
+ +
+ + 'mw-input loginPassword', + 'id' => 'wpRetype', + 'tabindex' => '5', + 'size' => '20', + 'required', + 'placeholder' => $this->getMsg( 'createacct-yourpasswordagain-ph' )->text() + ) + User::passwordChangeInputAttribs() ); + ?> +
+
+ data['useemail'] ) { ?> + + data['email'], 'email', array( + 'class' => 'mw-input loginText', + 'id' => 'wpEmail', + 'tabindex' => '6', + 'size' => '20', + 'placeholder' => $this->getMsg( 'createacct-email-ph' )->text() + ) + ( $this->data['emailrequired'] ? array() : array( 'required' => '' ) ) ); + ?> + + +
+ data['userealname'] ) { ?> +
+ + +
+ msgWiki( 'prefs-help-realname' ); ?> +
+
+ data['usereason'] ) { ?> +
+ + +
+ data['extraInput'] ) && is_array( $this->data['extraInput'] ) ) { + foreach ( $this->data['extraInput'] as $inputItem ) { ?> +
+ + + + + + + +
+ msgWiki( $inputItem['helptext'] ); ?> +
+ +
+ +
+ +
+ +haveData( 'uselang' ) ) { ?> +haveData( 'token' ) ) { ?> +
+
+
+

msg( 'createacct-benefit-heading' ); ?>

+
+
+
+
+

msg( 'createacct-benefit-head1' ); ?>

+

msg( 'createacct-benefit-body1' ); ?>

+
+
+
+
+
+

msg( 'createacct-benefit-head2' ); ?>

+

msg( 'createacct-benefit-body2' ); ?>

+
+
+
+
+
+

msg( 'createacct-benefit-head3' ); ?>

+

msg( 'createacct-benefit-body3' ); ?>

+
+
+
+
+
+ 'Username:', 'userlogin-yourname' => 'Username', 'userlogin-yourname-ph' => 'Enter your username', +'createacct-helpusername-url' => '{{ns:Project}}:Username_policy', +'createacct-helpusername-link' => '[[{{MediaWiki:createacct-helpusername-url}}|(help me choose)]]', 'yourpassword' => 'Password:', 'userlogin-yourpassword' => 'Password', 'userlogin-yourpassword-ph' => 'Enter your password', +'createacct-yourpassword-ph' => 'Enter a password', 'yourpasswordagain' => 'Retype password:', +'createacct-yourpasswordagain' => 'Confirm password', +'createacct-yourpasswordagain-ph' => 'Enter password again', 'remembermypassword' => 'Remember my login on this browser (for a maximum of $1 {{PLURAL:$1|day|days}})', 'userlogin-remembermypassword' => 'Remember me', 'userlogin-signwithsecure' => 'Sign in with secure server', @@ -1111,8 +1116,28 @@ Do not forget to change your [[Special:Preferences|{{SITENAME}} preferences]].', 'userlogin-resetlink' => 'Forgotten your login details?', 'helplogin-url' => 'Help:Logging in', 'userlogin-helplink' => '[[{{MediaWiki:helplogin-url}}|Help with logging in]]', +'createacct-join' => 'Enter your information below.', +'createacct-emailrequired' => 'Email address', +'createacct-emailoptional' => 'Email address (optional)', +'createacct-email-ph' => 'Enter your email address', 'createaccountmail' => 'Use a temporary random password and send it to the email address specified below', +'createacct-realname' => 'Real name (optional)', 'createaccountreason' => 'Reason:', +'createacct-reason' => 'Reason', +'createacct-captcha' => 'Security check', +'createacct-captcha-help-url' => '{{ns:Project}}:Request an account', +'createacct-imgcaptcha-help' => 'Can\'t see the image? [[{{MediaWiki:createacct-captcha-help-url}}|Request an account]]', +'createacct-imgcaptcha-ph' => 'Enter the text you see above', +'createacct-benefit-heading' => '{{SITENAME}} is made by people like you.', +'createacct-benefit-icon1' => 'icon-edits', +'createacct-benefit-head1' => '{{NUMBEROFEDITS}}', +'createacct-benefit-body1' => 'edits', +'createacct-benefit-icon2' => 'icon-pages', +'createacct-benefit-head2' => '{{NUMBEROFARTICLES}}', +'createacct-benefit-body2' => 'pages', +'createacct-benefit-icon3' => 'icon-contributors', +'createacct-benefit-head3' => '{{NUMBEROFUSERS}}', +'createacct-benefit-body3' => 'contributors this month', 'badretype' => 'The passwords you entered do not match.', 'userexists' => 'Username entered already in use. Please choose a different name.', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index 6084ba2161..1478f35238 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -1061,7 +1061,12 @@ In user preferences. 'userlogin-yourpassword' => 'In new vertical user login & create account forms, label for password field. {{Identical|Password}}', 'userlogin-yourpassword-ph' => 'Placeholder text in new userlogin form for password field.', +'createacct-helpusername-url' => 'The URL of a page providing username guidance for the wiki.', +'createacct-helpusername-link' => 'Message in new create account form providing guidance for username.', +'createacct-yourpassword-ph' => 'Placeholder text in new create account form for password field.', 'yourpasswordagain' => 'In user preferences', +'createacct-yourpasswordagain' => 'In new create account form, label for field to re-enter password', +'createacct-yourpasswordagain-ph' => 'Placeholder text in new create account form for re-enter password field.', 'remembermypassword' => 'A check box in [[Special:UserLogin]] {{Identical|Remember my login on this computer}}', @@ -1129,8 +1134,28 @@ Wikitext linking to login help. See also: * {{msg-mw|Helplogin-url}}', +'createacct-join' => 'Subheading of vertical-layout create account form encouraging user to join the wiki.', +'createacct-emailrequired' => 'Label in vertical-layout create account form for email field when it is required.', +'createacct-emailoptional' => 'Label in vertical-layout create account form for email field when it is optional.', +'createacct-email-ph' => 'Placeholder in vertical-layout create account form for email field.', 'createaccountmail' => 'Button text for creating a new account and sending the new password to the specified e-mail address directly, as used on [[Special:UserLogin/signup]] if creating accounts by e-mail is allowed.', +'createacct-realname' => 'In vertical-layout create account form, label for field to enter optional real name.', 'createaccountreason' => '{{Identical|Reason}}', +'createacct-reason' => 'In vertical-layout create account form, label for field to enter reason to create an account when already logged-in.', +'createacct-captcha' => 'Label in vertical-layout create account form for CAPTCHA input field when repositioned by JavaScript.', +'createacct-captcha-help-url' => 'The URL of a page providing CAPTCHA assistance for the wiki.', +'createacct-imgcaptcha-help' => 'Help text in vertical-layout create account form for image CAPTCHA input field when repositioned by JavaScript.', +'createacct-imgcaptcha-ph' => 'Placehodler text in vertical-layout create account form for image CAPTCHA input field when repositioned by JavaScript.', +'createacct-benefit-heading' => 'In vertical-layout create account form, the heading for the section describing the benefits of creating an account.', +'createacct-benefit-icon1' => 'In vertical-layout create account form, the CSS style for the div next to the first benefit. If you replace this you will need probably need to adjust CSS.', +'createacct-benefit-head1' => 'In vertical-layout create account form, the text in the heading for the first benefit. Do not edit the magic word; if you replace it you will probably need to adjust CSS.', +'createacct-benefit-body1' => 'In vertical-layout create account form, the text for the first benefit.', +'createacct-benefit-icon2' => 'In vertical-layout create account form, the CSS style for the div next to the second benefit. If you replace this you will need probably need to adjust CSS.', +'createacct-benefit-head2' => 'In vertical-layout create account form, the text in the heading for the second benefit. Do not edit the magic word; if you replace it you will probably need to adjust CSS.', +'createacct-benefit-body2' => 'In vertical-layout create account form, the text for the second benefit.', +'createacct-benefit-icon3' => 'In vertical-layout create account form, the CSS style for the div next to the third benefit. If you replace this you will need probably need to adjust CSS.', +'createacct-benefit-head3' => 'In vertical-layout create account form, the text in the heading for the third benefit. Do not edit the magic word; if you replace it you will probably need to adjust CSS.', +'createacct-benefit-body3' => 'In vertical-layout create account form, the text for the third benefit.', 'badretype' => 'Used as error message when the new password and its retype do not match.', 'userexists' => 'Used as error message in creating a user account.', 'loginerror' => 'Used as title of error message. @@ -1180,7 +1205,7 @@ $1 is the minimum number of characters in the password.', Parameters: * $1 is a user name. This parameter can be used with GENDER.', -'noemailcreate' => 'Used as error message in [[Special:UserLogin]].', +'noemailcreate' => 'Used as error message when one user creates an account for another and there is no email.', 'passwordsent' => '* $1 - username', 'blocked-mailpassword' => 'Used as error message in password recovery.', 'eauthentsent' => "This message appears after entering an e-mail address in [[Special:Preferences]] > {{int:prefs-personal}} > {{int:email}}, then clicking on '{{int:saveprefs}}'.", diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index cc5b9d36bd..4410187284 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -442,10 +442,15 @@ $wgMessageStructure = array( 'yourname', 'userlogin-yourname', 'userlogin-yourname-ph', + 'createacct-helpusername-url', + 'createacct-helpusername-link', 'yourpassword', 'userlogin-yourpassword', 'userlogin-yourpassword-ph', + 'createacct-yourpassword-ph', 'yourpasswordagain', + 'createacct-yourpasswordagain', + 'createacct-yourpasswordagain-ph', 'remembermypassword', 'userlogin-remembermypassword', 'userlogin-signwithsecure', @@ -472,8 +477,28 @@ $wgMessageStructure = array( 'userlogin-resetlink', 'helplogin-url', 'userlogin-helplink', + 'createacct-join', + 'createacct-emailrequired', + 'createacct-emailoptional', + 'createacct-email-ph', 'createaccountmail', + 'createacct-realname', 'createaccountreason', + 'createacct-reason', + 'createacct-captcha', + 'createacct-captcha-help-url', + 'createacct-imgcaptcha-help', + 'createacct-imgcaptcha-ph', + 'createacct-benefit-heading', + 'createacct-benefit-icon1', + 'createacct-benefit-head1', + 'createacct-benefit-body1', + 'createacct-benefit-icon2', + 'createacct-benefit-head2', + 'createacct-benefit-body2', + 'createacct-benefit-icon3', + 'createacct-benefit-head3', + 'createacct-benefit-body3', 'badretype', 'userexists', 'loginerror', diff --git a/resources/Resources.php b/resources/Resources.php index c96184e680..538ee01706 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -944,6 +944,22 @@ return array( ), 'position' => 'top', ), + 'mediawiki.special.createaccount.vform' => array( + 'styles' => array( + 'resources/mediawiki.special/mediawiki.special.vforms.css', + 'resources/mediawiki.special/mediawiki.special.createAccount.vform.css', + ), + 'position' => 'top', + ), + 'mediawiki.special.createaccount.vform.js' => array( + 'scripts' => 'resources/mediawiki.special/mediawiki.special.createAccount.vform.js', + 'messages' => array( + 'createacct-captcha', + 'createacct-imgcaptcha-ph' + ), + 'dependencies' => 'mediawiki.jqueryMsg', + 'position' => 'top', + ), 'mediawiki.special.javaScriptTest' => array( 'scripts' => 'resources/mediawiki.special/mediawiki.special.javaScriptTest.js', 'messages' => array_merge( Skin::getSkinNameMessages(), array( diff --git a/resources/mediawiki.special/images/icon-contributors.png b/resources/mediawiki.special/images/icon-contributors.png new file mode 100644 index 0000000000000000000000000000000000000000..62b37f95c9ed0193018300132c2d216d6336e730 GIT binary patch literal 4043 zcmV;+4>a(JP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^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{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0007_Nkl$p8zGUBC@sI)%1g0#Apngg1e^z~>a& zIt5(FwS<8Qpp-LO3+VJ9-T`g`QwiHXZI;jS0=#7q^UPb|9 z2HfvC6K&E28o<$z_48)=JP*Ki;88|5^p}7Web&`dKwOIeOoUjJ67B#`fFB|2w-H^- z`Fo6Q=7DoQkAc5|)rj>q;Ho3ypP1V%*di9~BJyFt`dLRro2j4`V$lFMVr=7rSh4KK z0&vzxz-G+tY!RyteOUy~_y%Zmm7N8y#6;Zd*q@WW%|vYbQ#Z>81MsKK!-!A7SKz0a zZ;uc>?KxnkedE4Q7Vt3Ug{-iE zdlKwh2bNM8gV%g6;i;aR-%WzY@GXL8l9Ryxh<;BNebCN24Ko{AH>K3?t$!JqF}E2r zzFqaQ&PvQOYXI*F9(UDtvco>V*6aW;cDfV3zZd=@K+hvU0SZun0#pPjKmiI+5ugAC zC_qJk0u-PC6#)uRfC5wmC_n)UP!V8u8U4?XZ_MEs%L4qDC4z50RKgkqH3oW_kHD)0 z`?rT3aFysUKvlvT0|h8RCC97qL4to56eVTf0INj*{X!+I2r$=_^cP>9fdUku02SB# Z9RO)gXT!e1+G79!002ovPDHLkV1hJ!XLJAn literal 0 HcmV?d00001 diff --git a/resources/mediawiki.special/mediawiki.special.createAccount.vform.css b/resources/mediawiki.special/mediawiki.special.createAccount.vform.css new file mode 100644 index 0000000000..a1d78a218c --- /dev/null +++ b/resources/mediawiki.special/mediawiki.special.createAccount.vform.css @@ -0,0 +1,98 @@ +/* Disable the underline that Vector puts on h2 headings, and bold them. */ +.mw-ui-container h2 { + border: 0; + font-weight: bold; +} + +/* shuffled CAPTCHA */ +#wpCaptchaWord { + margin-top: 6px; +} + +.mw-createacct-captcha-container { + background-color: #f8f8f8; + border: 1px solid #c9c9c9; + padding: 10px; + text-align: center; +} + +.mw-createacct-captcha-image-container { + background-color: #fff; + min-height: 95px; +} + +.mw-createacct-captcha-assisted { + display: block; + margin-top: 0.5em; +} + +.mw-createacct-captcha-and-reload { + border: 1px solid #c9c9c9; + display: table-cell; + width: 270px; + background-color: #FFF; +} + +.mw-createacct-captcha-and-reload .confirmedit-captcha-reload { + display: block; + float: right; +} + +/* Benefits column CSS to the right (if it fits) of the form. */ +.mw-ui-container #userloginForm { + float: left; +} + +div.mw-createacct-benefits-container { + float: left +} + +div.mw-createacct-benefits-container h2 { + margin-bottom: 30px; +} + +div.mw-benefits-icon { + display: inline-block; + padding: 0; + float: left; + width: 80px; + height: 75px; + margin-right: 15px; + border: 0; +} + +.mw-benefits-icon.icon-edits { + /* @embed */ + background: url(images/icon-edits.png) no-repeat right; +} + +.mw-benefits-icon.icon-pages { + /* @embed */ + background: url(images/icon-pages.png) no-repeat right; +} + +.mw-benefits-icon.icon-contributors { + /* @embed */ + background: url(images/icon-contributors.png) no-repeat right; +} + +/* Special font for numbers in benefits*/ +div.mw-number-text h3 { + top: 0; + margin: 0; + padding: 0; + color: #252525; + font-family: 'Georgia', serif; + font-weight: normal; + font-size: 2.2em; + line-height: 1.2; + text-align: center; +} + +div.mw-number-text { + display: block; + font-size: 1.2em; + color: #444; + margin-top: 1em; + text-align: center; +} diff --git a/resources/mediawiki.special/mediawiki.special.createAccount.vform.js b/resources/mediawiki.special/mediawiki.special.createAccount.vform.js new file mode 100644 index 0000000000..11084fe961 --- /dev/null +++ b/resources/mediawiki.special/mediawiki.special.createAccount.vform.js @@ -0,0 +1,75 @@ +/** + * JavaScript for Create account form (Special:UserLogin?type=signup). + */ +( function ( mw, $ ) { + + $( document ).ready( function( $ ) { + var $content = $( '#mw-content-text' ), + $submit = $content.find( '#wpCreateaccount' ), + tabIndex, + $captchaStuff, + helpMsg = mw.config.get( 'wgCreateacctImgcaptchaHelp' ), + captchaImage; + + /* + * CAPTCHA + * The CAPTCHA is in a div style="captcha" at the top of the form. + * If it's a FancyCaptcha, then we remove it and insert it lower down, + * in a customized div with just what we need (e.g. no + * fancycaptcha-createaccount message). + */ + if ( !$submit.length) { + return; + } + tabIndex = $submit.prop( 'tabindex' ) - 1; + $captchaStuff = $content.find ( '.captcha' ); + + if ( $captchaStuff.length ) { + + // The FancyCaptcha image has this class in the ConfirmEdit extension + // after 2013-04-18. + captchaImage = $captchaStuff.find( 'img.fancycaptcha-image' ); + if ( captchaImage.length !== 1 ) { + return; + } + + $captchaStuff.remove(); + + // Insert another div before the submit button. + $submit.closest( 'div' ) + .before( [ + '
', + '', + '
', + '
', + '
', + 'PLACEHOLDER', + '
', + '
', + '', + '' + helpMsg + '', + '
', + '
' + ].join( '' ) + ); + + // Replace the placeholder img with the img from the old CAPTCHA. + captchaImage.replaceAll( $content.find( '#mw-createacct-captcha' ) ); + + // Append CAPTCHA reload, if any. + $( '.mw-createacct-captcha-and-reload' ).append( $captchaStuff.find( '.confirmedit-captcha-reload' ) ); + + // Find the input field, add the text (if any) of the existing CAPTCHA + // field (although usually it's blanked out on every redisplay), + // and after it move over the hidden field that tells the CAPTCHA + // what to do. + $content.find( '#wpCaptchaWord' ) + .val( $captchaStuff.find( '#wpCaptchaWord' ).val() ) + .after( $captchaStuff.find( '#wpCaptchaId' ) ); + } + + }); + +}( mediaWiki, jQuery ) ); diff --git a/resources/mediawiki.special/mediawiki.special.vforms.css b/resources/mediawiki.special/mediawiki.special.vforms.css index ca9fc918c9..2d948eab2b 100644 --- a/resources/mediawiki.special/mediawiki.special.vforms.css +++ b/resources/mediawiki.special/mediawiki.special.vforms.css @@ -41,3 +41,12 @@ section.mw-form-header { text-shadow: 0 1px #fae3e3; word-wrap: break-word; } + +/* + * Override the right margin of the form to give space in case a benefits + * column appears to the side. + * + */ +.mw-ui-container #userloginForm { + margin-right: 100px; +} -- 2.20.1