Matmarex has uploaded a new change for review. https://gerrit.wikimedia.org/r/80769
Change subject: Show signup link on Special:UserLogin when user is logged in ...................................................................... Show signup link on Special:UserLogin when user is logged in Bug: 53306 Change-Id: I1672ee09330c231110c4db310a645d1382cc0b59 --- M includes/specials/SpecialUserlogin.php M includes/templates/Userlogin.php M resources/mediawiki.special/mediawiki.special.userLogin.css 3 files changed, 27 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/69/80769/1 diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 9975741..6efb303 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -1164,7 +1164,7 @@ $template->set( 'cansecurelogin', ( $wgSecureLogin === true ) ); $template->set( 'stickHTTPS', (int)$this->mStickHTTPS ); - if ( $this->mType === 'signup' && $user->isLoggedIn() ) { + if ( $user->isLoggedIn() ) { $template->set( 'createAnother', true ); } else { $template->set( 'createAnother', false ); @@ -1227,9 +1227,7 @@ * @return bool */ private function showCreateOrLoginLink( &$user ) { - if ( $user->isLoggedIn() ) { - return false; - } elseif ( $this->mType == 'signup' ) { + if ( $this->mType == 'signup' ) { return true; } elseif ( $user->isAllowed( 'createaccount' ) ) { return true; diff --git a/includes/templates/Userlogin.php b/includes/templates/Userlogin.php index 46a0235..f27823b 100644 --- a/includes/templates/Userlogin.php +++ b/includes/templates/Userlogin.php @@ -164,9 +164,15 @@ <?php echo $this->getMsg( 'userlogin-helplink' )->parse(); ?> </div> <?php if ( $this->haveData( 'createOrLoginHref' ) ) { ?> - <div id="mw-createaccount-cta"> - <h3 id="mw-userloginlink"><?php $this->msg( 'userlogin-noaccount' ); ?><a href="<?php $this->text( 'createOrLoginHref' ); ?>" id="mw-createaccount-join" tabindex="7" class="mw-ui-button mw-ui-constructive"><?php $this->msg( 'userlogin-joinproject' ); ?></a></h3> - </div> + <?php if ( $this->data['createAnother'] ) { ?> + <div id="mw-createaccount-another"> + <h3 id="mw-userloginlink"><a href="<?php $this->text( 'createOrLoginHref' ); ?>" id="mw-createaccount-join" tabindex="7" class="mw-ui-button"><?php $this->msg( 'createacct-another-submit' ); ?></a></h3> + </div> + <?php } else { ?> + <div id="mw-createaccount-cta"> + <h3 id="mw-userloginlink"><?php $this->msg( 'userlogin-noaccount' ); ?><a href="<?php $this->text( 'createOrLoginHref' ); ?>" id="mw-createaccount-join" tabindex="7" class="mw-ui-button mw-ui-constructive"><?php $this->msg( 'userlogin-joinproject' ); ?></a></h3> + </div> + <?php } ?> <?php } ?> <?php if ( $this->haveData( 'uselang' ) ) { ?><input type="hidden" name="uselang" value="<?php $this->text( 'uselang' ); ?>" /><?php } ?> <?php if ( $this->haveData( 'token' ) ) { ?><input type="hidden" name="wpLoginToken" value="<?php $this->text( 'token' ); ?>" /><?php } ?> diff --git a/resources/mediawiki.special/mediawiki.special.userLogin.css b/resources/mediawiki.special/mediawiki.special.userLogin.css index 312f811..ead75ad 100644 --- a/resources/mediawiki.special/mediawiki.special.userLogin.css +++ b/resources/mediawiki.special/mediawiki.special.userLogin.css @@ -10,21 +10,28 @@ padding: 0 0 0 11px; } +#mw-createaccount-cta, +#mw-createaccount-another { + width: 20em; + text-align: center; + margin: 0 auto; +} + +#mw-createaccount-cta h3, +#mw-createaccount-another h3 { + font-size: 0.9em; + font-weight: normal; + text-align: center; +} + /* The login form invites users to create an account */ #mw-createaccount-cta { - width: 20em; - height: 10em; + height: 6em; + padding-top: 3.5em; text-align: center; /* @embed */ background: url(images/glyph-people-large.png) no-repeat 50%; margin: 0 auto; -} - -#mw-createaccount-cta h3 { - font-size: 0.9em; - font-weight: normal; - text-align: center; - padding-top: 4em; } #mw-createaccount-join { -- To view, visit https://gerrit.wikimedia.org/r/80769 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1672ee09330c231110c4db310a645d1382cc0b59 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Matmarex <matma....@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits