jenkins-bot has submitted this change and it was merged.

Change subject: Use core login form
......................................................................


Use core login form

Yay! Deleting code debt.

Bug: T70758
Bug: T65328
Bug: T74910
Bug: T54059
Change-Id: I65e943b6dad8bfea994020f9f555bd095da1a171
---
M MobileFrontend.php
M includes/MobileFrontend.hooks.php
M includes/config/Experimental.php
D includes/skins/UserAccountCreateMobileTemplate.php
D includes/skins/UserLoginAndCreateTemplate.php
D includes/skins/UserLoginMobileTemplate.php
M resources/skins.minerva.special.userlogin.styles/userlogin.less
7 files changed, 104 insertions(+), 585 deletions(-)

Approvals:
  Florianschmidtwelzow: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/MobileFrontend.php b/MobileFrontend.php
index 3ecd384..8b79add 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -98,10 +98,6 @@
        'SkinMinervaBeta' => 'skins/SkinMinervaBeta',
        'SkinMinervaAlpha' => 'skins/SkinMinervaAlpha',
 
-       'UserLoginAndCreateTemplate' => 'skins/UserLoginAndCreateTemplate',
-       'UserLoginMobileTemplate' => 'skins/UserLoginMobileTemplate',
-       'UserAccountCreateMobileTemplate' => 
'skins/UserAccountCreateMobileTemplate',
-
        'MobileFrontend\Browse\TagService' => 'browse/TagService',
        'MobileFrontend\Browse\NullTagService' => 'browse/NullTagService',
 );
diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 8187fc6..b48f071 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -581,45 +581,28 @@
         * @param QuickTemplate $tpl Login or Usercreate template
         * @param String $mode Is this function called in context of UserCreate 
or UserLogin?
         */
-       public static function changeUserLoginCreateForm( &$tpl, $mode = 
'userlogin' ) {
+       public static function changeUserLoginCreateForm( &$tpl ) {
                $context = MobileContext::singleton();
+               // otherwise just(tm) add a logoheader, if there is any
+               $mfLogo = $context->getMFConfig()
+                       ->get( 'MobileFrontendLogo' );
+
                // do nothing in desktop mode
-               if ( !$context->shouldDisplayMobileView() ) {
-                       return;
-               }
-
-               if (
-                       // check, if the core login page should be used, or not
-                       !$context->getMFConfig()->get( 'MFNoLoginOverride' ) &&
-                       !$context->isBetaGroupMember()
-               ) {
-                       // if not, overwrite the default login/create templates 
from core with MF's own ones
-                       if ( $mode === 'userlogin' ) {
-                               $tpl = new UserLoginMobileTemplate( $tpl );
-                       } else {
-                               $tpl = new UserAccountCreateMobileTemplate( 
$tpl );
-                       }
-               } else {
-                       // otherwise just(tm) add a logoheader, if there is any
-                       $mfLogo = $context->getMFConfig()
-                               ->get( 'MobileFrontendLogo' );
-
-                       if ( $mfLogo ) {
-                               $tpl->extend(
-                                       'formheader',
-                                       Html::openElement(
-                                               'div',
-                                               array( 'class' => 'watermark' )
-                                       ) .
-                                       Html::element( 'img',
-                                               array(
-                                                       'src' => $mfLogo,
-                                                       'alt' => '',
-                                               )
-                                       ) .
-                                       Html::closeElement( 'div' )
-                               );
-                       }
+               if ( $context->shouldDisplayMobileView() && $mfLogo ) {
+                       $tpl->extend(
+                               'formheader',
+                               Html::openElement(
+                                       'div',
+                                       array( 'class' => 'watermark' )
+                               ) .
+                               Html::element( 'img',
+                                       array(
+                                               'src' => $mfLogo,
+                                               'alt' => '',
+                                       )
+                               ) .
+                               Html::closeElement( 'div' )
+                       );
                }
        }
 
@@ -632,7 +615,6 @@
         */
        public static function onUserLoginForm( &$template ) {
                self::changeUserLoginCreateForm( $template );
-
                return true;
        }
 
@@ -644,8 +626,7 @@
         * @return bool
         */
        public static function onUserCreateForm( &$template ) {
-               self::changeUserLoginCreateForm( $template, 'usercreate' );
-
+               self::changeUserLoginCreateForm( $template );
                return true;
        }
 
diff --git a/includes/config/Experimental.php b/includes/config/Experimental.php
index a340132..a16ab12 100644
--- a/includes/config/Experimental.php
+++ b/includes/config/Experimental.php
@@ -36,15 +36,10 @@
 );
 
 /**
- * Disable login page override in all modes.
- * FIXME: This config is highly experimental and temporary only. Use it on 
your own risk!
- */
-$wgMFNoLoginOverride = false;
-
-/**
  * This is a list of html tags, that could be recognized as the first heading 
of a page.
  * This is an interim solution to fix Bug T110436 and shouldn't be used, if 
you don't know,
  * what you do. Moreover, this configuration variable will be removed in the 
near future
  * (hopefully).
  */
 $wgMFMobileFormatterHeadings = array( 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' );
+
diff --git a/includes/skins/UserAccountCreateMobileTemplate.php 
b/includes/skins/UserAccountCreateMobileTemplate.php
deleted file mode 100644
index dcbf9f5..0000000
--- a/includes/skins/UserAccountCreateMobileTemplate.php
+++ /dev/null
@@ -1,170 +0,0 @@
-<?php
-/**
- * UserAccountCreateMobileTemplate.php
- */
-
-/**
- * Provides a custom account creation form for mobile devices
- */
-class UserAccountCreateMobileTemplate extends UserLoginAndCreateTemplate {
-
-       /**
-        * Render Login/Create specific template
-        * @todo refactor this into parent template
-        */
-       public function execute() {
-               $action = $this->data['action'];
-               $token = $this->data['token'];
-               $watchArticle = $this->getArticleTitleToWatch();
-               $stickHTTPS = ( $this->doStickHTTPS() ) ? Html::input( 
'wpStickHTTPS', 'true', 'hidden' ) : '';
-               $username = ( strlen( $this->data['name'] ) ) ? 
$this->data['name'] : null;
-               // handle captcha
-               $captchaHtml = '';
-               if ( isset( $this->data['header'] ) ) {
-                       $captchaHtml .= $this->data['header'];
-               }
-               if ( isset( $this->data['extrafields'] ) ) {
-                       $captchaHtml .= $this->data['extrafields'];
-               }
-               $captcha = $this->handleCaptcha( $captchaHtml );
-
-               $form =
-                       Html::openElement( 'form',
-                               array( 'name' => 'userlogin2',
-                                       'method' => 'post',
-                                       'class' => 'user-login',
-                                       'action' => $action,
-                                       'id' => 'userlogin2' ) ) .
-                       Html::openElement( 'div',
-                               array(
-                                       'class' => 'inputs-box'
-                               )
-                       ) .
-                       Html::input( 'wpName', $username, 'text',
-                               array( 'class' => 'loginText',
-                                       'placeholder' => wfMessage( 
'mobile-frontend-username-placeholder' )->text(),
-                                       'id' => 'wpName1',
-                                       'tabindex' => '1',
-                                       'size' => '20',
-                                       'required' ) ) .
-                       Html::input( 'wpPassword', null, 'password',
-                               array( 'class' => 'loginPassword',
-                                       'placeholder' => wfMessage( 
'mobile-frontend-password-placeholder' )->text(),
-                                       'id' => 'wpPassword2',
-                                       'tabindex' => '2',
-                                       'size' => '20' ) ) .
-                       Html::input( 'wpRetype', null, 'password',
-                               array( 'class' => 'loginPassword',
-                                       'placeholder' => wfMessage( 
'mobile-frontend-password-confirm-placeholder' )->text(),
-                                       'id' => 'wpRetype',
-                                       'tabindex' => '3',
-                                       'size' => '20' ) ) .
-                       Html::input( 'wpEmail', null, 'email',
-                               array( 'class' => 'loginText',
-                                       'placeholder' => wfMessage( 
'mobile-frontend-account-create-email-placeholder' )->text(),
-                                       'id' => 'wpEmail',
-                                       'tabindex' => '4',
-                                       'size' => '20' ) ) .
-                       Html::closeElement( 'div' ) .
-                       $captcha .
-                       Html::input( 'wpCreateaccount',
-                               wfMessage( 
'mobile-frontend-account-create-submit' )->text(),
-                               'submit',
-                               array( 'id' => 'wpCreateaccount',
-                                       'class' => MobileUI::buttonClass( 
'constructive' ),
-                                       'tabindex' => '6'
-                               )
-                       ) .
-                       Html::input( 'wpRemember', '1', 'hidden' ) .
-                       Html::input( 'wpCreateaccountToken', $token, 'hidden' ) 
.
-                       Html::input( 'watch', $watchArticle, 'hidden' ) .
-                       $stickHTTPS .
-                       Html::closeElement( 'form' );
-               echo Html::openElement( 'div', array( 'id' => 
'mw-mf-accountcreate', 'class' => 'content' ) );
-               $this->renderMessageHtml( 'signup', true );
-               echo $form;
-               echo Html::closeElement( 'div' );
-       }
-
-       /**
-        * Hijack captcha output
-        *
-        * Captcha output appears in $tpl->data['header'] but there's a lot
-        * of cruft that comes with it. We just want to get the captcha image
-        * a display an input field for the user to enter captcha info, without
-        * the additinal cruft.
-        *
-        * @todo move this into ConfirmEdit extension when MW is context aware
-        * @param string $header
-        * @return string
-        */
-       protected function handleCaptcha( $header ) {
-               // first look for <div class="captcha">, otherwise early return
-               if ( !$header || !stristr( $header, 'captcha' ) ) {
-                       return '';
-               }
-
-               // find the captcha ID
-               $lines = explode( "\n", $header );
-               $pattern = '/wpCaptchaId=([^"]+)"/';
-               $matches = array();
-               foreach ( $lines as $line ) {
-                       preg_match( $pattern, $line, $matches );
-                       // if we have a match, stop processing
-                       if ( $matches ) break;
-               }
-               // make sure we've gotten the captchaId
-               if ( !isset( $matches[1] ) ) {
-                       return $header;
-               }
-               $captchaId = $matches[1];
-
-               // generate src for captcha img
-               $captchaSrc = SpecialPage::getTitleFor( 'Captcha', 'image' )
-                       ->getLocalUrl( array( 'wpCaptchaId' => $captchaId ) );
-
-               // add reload if fancyCaptcha and has reload
-               if ( stristr( $header, 'fancycaptcha-reload' ) ) {
-                       $output = $this->getSkin()->getOutput();
-                       $output->addModuleStyles( 
'ext.confirmEdit.fancyCaptcha.styles' );
-                       $output->addModules( 
'ext.confirmEdit.fancyCaptchaMobile' );
-                       $captchaReload = Html::element( 'br' ) .
-                               Html::openElement( 'div', array( 'id' => 
'mf-captcha-reload-container' ) ) .
-                               Html::element(
-                                       'span',
-                                       array(
-                                               'class' => 
'confirmedit-captcha-reload fancycaptcha-reload'
-                                       ),
-                                       wfMessage( 'fancycaptcha-reload-text' 
)->text()
-                               ) .
-                               Html::closeElement( 'div' ); 
#mf-captcha-reload-container
-               } else {
-                       $captchaReload = '';
-               }
-
-               // captcha output html
-               $captchaHtml =
-                       Html::openElement( 'div',
-                               array( 'class' => 'inputs-box' ) ) .
-                       Html::element( 'img',
-                               array(
-                                       'class' => 'fancycaptcha-image',
-                                       'src' => $captchaSrc,
-                               )
-                       ) .
-                       $captchaReload .
-                       Html::input( 'wpCaptchaWord', null, 'text',
-                               array(
-                                       'placeholder' => wfMessage( 
'mobile-frontend-account-create-captcha-placeholder' )->text(),
-                                       'id' => 'wpCaptchaWord',
-                                       'tabindex' => '5',
-                                       'size' => '20',
-                                       'autocorrect' => 'off',
-                                       'autocapitalize' => 'off',
-                               )
-                       ) .
-                       Html::input( 'wpCaptchaId', $captchaId, 'hidden', 
array( 'id' => 'wpCaptchaId' ) ) .
-                       Html::closeElement( 'div' );
-               return $captchaHtml;
-       }
-}
diff --git a/includes/skins/UserLoginAndCreateTemplate.php 
b/includes/skins/UserLoginAndCreateTemplate.php
deleted file mode 100644
index 33ccf07..0000000
--- a/includes/skins/UserLoginAndCreateTemplate.php
+++ /dev/null
@@ -1,137 +0,0 @@
-<?php
-/**
- * UserLoginAndCreateTemplate.php
- */
-
-/**
- * Template overloader for user login and account cration templates
- *
- * Facilitates hijacking existing account creation/login template objects
- * by copying their properties to this new template, and exposing some
- * special mobile-specific magic.
- *
- * This class implements UsercreateTemplate instead of BaseTemplate due to 
T102775.
- * It's save to extend this class only until UserloginTemplate doesn't get 
functions,
- * which are needed by our own Userlogin template.
- */
-abstract class UserLoginAndCreateTemplate extends UsercreateTemplate {
-
-       /**
-        * Overload the parent constructor
-        *
-        * Does not call the parent's constructor to prevent overwriting
-        * $this->data and $this->translatorobject since we're essentially
-        * just hijacking the existing template and its data here.
-        * @param UsercreateTemplate $template The original template object to 
overwrite
-        */
-       public function __construct( $template ) {
-               $this->copyObjectProperties( $template );
-       }
-
-       /**
-        * Render message box with system messages, e.g. errors or already 
logged-in notices
-        *
-        * @param string $action The type of action the page is used for 
('login' or 'signup')
-        * @param bool $register Whether the user can register an account
-        */
-       protected function renderMessageHtml( $action, $register = false ) {
-               $msgBox = ''; // placeholder for displaying any login-related 
system messages (eg errors)
-               $message = $this->data['message'];
-               $messageType = $this->data['messagetype'];
-
-               // FIXME: Migrate this to a server-side Mustache template
-               // If there is a system message (error, warning, or success) 
display that
-               if ( $message && $messageType ) {
-                       $msgBox .= Html::openElement( 'div', array( 'class' => 
$messageType . 'box' ) );
-                       $msgBox .= $message;
-                       $msgBox .= Html::closeElement( 'div' );
-               // Render already logged-in notice
-               } elseif ( $this->data['loggedin'] ) {
-                       $msg = ( $register ) ? 
'mobile-frontend-userlogin-loggedin-register' : 'userlogin-loggedin';
-                       $msgBox .= Html::openElement( 'div', array( 'class' => 
'warningbox' ) );
-                       $msgBox .= wfMessage( $msg )->params( 
$this->data['loggedinuser'] )->parse();
-                       $msgBox .= Html::closeElement( 'div' );
-               // Show default welcome message
-               } else {
-                       // The warningbox class is used more for informational 
purposes than actual warnings.
-                       $msgBox .= Html::openElement( 'div', array( 'class' => 
'warningbox' ) );
-                       $headerMsg = wfMessage( 'mobile-frontend-generic-login' 
)->parse();
-                       $msgBox .= Html::element( 'strong', array(), $headerMsg 
);
-                       $msgBox .= Html::element( 'br' );
-                       $msgBox .= wfMessage( 
"mobile-frontend-generic-{$action}-action" )->plain();
-                       $msgBox .= Html::closeElement( 'div' );
-               }
-               $msgBox .= $this->getLogoHtml();
-               echo $msgBox;
-       }
-
-       /**
-        * Copy public properties of one object to this one
-        * @param UsercreateTemplate $tpl The object whose properties should be 
copied
-        */
-       protected function copyObjectProperties( $tpl ) {
-               foreach ( get_object_vars( $tpl ) as $prop => $value ) {
-                       $this->$prop = $value;
-               }
-       }
-
-       /**
-        * Get the current RequestContext
-        * @return RequestContext
-        */
-       public function getRequestContext() {
-               return RequestContext::getMain();
-       }
-
-       /**
-        * Prepare template data if an anon is attempting to log in after 
watching an article
-        * @return string
-        */
-       protected function getArticleTitleToWatch() {
-               $ret = '';
-               $request = $this->getRequestContext()->getRequest();
-               if ( $request->getVal( 'returntoquery' ) == 
'article_action=watch' &&
-                       !is_null( $request->getVal( 'returnto' ) ) ) {
-                       $ret = $request->getVal( 'returnto' );
-               }
-               return $ret;
-       }
-
-       /**
-        * Determine whether or not we should attempt to 'stick https'
-        *
-        * If wpStickHTTPS is set as a value in login requests, when a user
-        * is logged in to HTTPS and if they attempt to view a page on http,
-        * they will be automatically redirected to HTTPS.
-        * @see https://gerrit.wikimedia.org/r/#/c/24026/
-        * @return bool
-        */
-       protected function doStickHTTPS() {
-               $secureLogin = $this->config->get( 'SecureLogin' );
-               $request = $this->getRequestContext()->getRequest();
-               if ( $secureLogin && $request->detectProtocol() === 'https' ) {
-                       return true;
-               }
-               return false;
-       }
-
-       /**
-        * Display Mobile Frontend specific logo over login form.
-        */
-       protected function getLogoHtml() {
-               $mfLogo = MobileContext::singleton()->getMFConfig()
-                       ->get( 'MobileFrontendLogo' );
-
-               if ( !$mfLogo ) {
-                       return '';
-               }
-               return '<div class="watermark">'
-                       . Html::element( 'img',
-                               array(
-                                       'src' => $mfLogo,
-                                       'alt' => '',
-                               )
-                       )
-                       . '</div>';
-       }
-}
diff --git a/includes/skins/UserLoginMobileTemplate.php 
b/includes/skins/UserLoginMobileTemplate.php
deleted file mode 100644
index 96121b3..0000000
--- a/includes/skins/UserLoginMobileTemplate.php
+++ /dev/null
@@ -1,109 +0,0 @@
-<?php
-/**
- * UserLoginMobileTemplate.php
- */
-
-/**
- * Provides a custom login form for mobile devices
- */
-class UserLoginMobileTemplate extends UserLoginAndCreateTemplate {
-
-       /**
-        * Build the login page
-        * @todo Refactor this into parent template
-        */
-       public function execute() {
-               $action = $this->data['action'];
-               $token = $this->data['token'];
-               $watchArticle = $this->getArticleTitleToWatch();
-               $stickHTTPS = ( $this->doStickHTTPS() ) ? Html::input( 
'wpStickHTTPS', 'true', 'hidden' ) : '';
-               $username = ( strlen( $this->data['name'] ) ) ? 
$this->data['name'] : null;
-
-               // @TODO make sure this also includes returnto and 
returntoquery from the request
-               $query = array(
-                       'type' => 'signup',
-               );
-               // Security: $action is already filtered by SpecialUserLogin
-               $actionQuery = wfCgiToArray( $action );
-               if ( isset( $actionQuery['returnto'] ) ) {
-                       $query['returnto'] = $actionQuery['returnto'];
-               }
-               if ( isset( $actionQuery['returntoquery'] ) ) {
-                       $query['returntoquery'] = $actionQuery['returntoquery'];
-                       // Allow us to distinguish sign ups from the left nav 
to logins.
-                       // This allows us to show them an edit tutorial when 
they return to the page.
-                       if ( $query['returntoquery'] === 'welcome=yes' ) {
-                               $query['returntoquery'] = 
'campaign=leftNavSignup';
-                       }
-               }
-               // For Extension:Campaigns
-               $campaign = $this->getSkin()->getRequest()->getText( 'campaign' 
);
-               if ( $campaign ) {
-                       $query['campaign'] = $campaign;
-               }
-
-               // Check for permission to create new account first
-               $user = $this->getRequestContext()->getUser();
-               if ( $user->isAllowed( 'createaccount' ) ) {
-                       $signupLink = Linker::link( SpecialPage::getTitleFor( 
'Userlogin' ),
-                               wfMessage( 
'mobile-frontend-main-menu-account-create' )->text(),
-                               array( 'class'=> 'mw-mf-create-account 
mw-ui-block' ), $query );
-               } else {
-                       $signupLink = '';
-               }
-
-               // Check for permission to reset password first
-               if ( $this->data['canreset'] && $this->data['useemail'] && 
$this->data['resetlink'] === true ) {
-                       $passwordReset = Html::element( 'a', array(
-                               'class' => 'mw-userlogin-help mw-ui-block',
-                               'href' => SpecialPage::getTitleFor( 
'PasswordReset' )->getLocalUrl(),
-                       ),
-                       wfMessage( 'passwordreset' )->text() );
-               } else {
-                       $passwordReset = '';
-               }
-
-               $login = Html::openElement( 'div', array( 'id' => 
'mw-mf-login', 'class' => 'content' ) );
-
-               $form = Html::openElement( 'div', array() ) .
-                       Html::openElement( 'form',
-                               array( 'name' => 'userlogin',
-                                       'class' => 'user-login',
-                                       'method' => 'post',
-                                       'action' => $action ) ) .
-                       Html::openElement( 'div', array(
-                               'class' => 'inputs-box',
-                       ) ) .
-                       Html::input( 'wpName', $username, 'text',
-                               array( 'class' => 'loginText',
-                                       'placeholder' => wfMessage( 
'mobile-frontend-username-placeholder' )->text(),
-                                       'id' => 'wpName1',
-                                       'tabindex' => '1',
-                                       'size' => '20',
-                                       'required' ) ) .
-                       Html::input( 'wpPassword', null, 'password',
-                               array( 'class' => 'loginPassword',
-                                       'placeholder' => wfMessage( 
'mobile-frontend-password-placeholder' )->text(),
-                                       'id' => 'wpPassword1',
-                                       'tabindex' => '2',
-                                       'size' => '20' ) ) .
-                       Html::closeElement( 'div' ) .
-                       Html::input( 'wpRemember', '1', 'hidden' ) .
-                       Html::input( 'wpLoginAttempt', wfMessage( 
'mobile-frontend-login' )->text(), 'submit',
-                               array( 'id' => 'wpLoginAttempt',
-                                       'class' => $baseClass = 
MobileUI::buttonClass( 'constructive' ),
-                                       'tabindex' => '3' ) ) .
-                       Html::input( 'wpLoginToken', $token, 'hidden' ) .
-                       Html::input( 'watch', $watchArticle, 'hidden' ) .
-                       $stickHTTPS .
-                       Html::closeElement( 'form' ) .
-                       $passwordReset .
-                       $signupLink .
-                       Html::closeElement( 'div' );
-               echo $login;
-               $this->renderMessageHtml( 'login' );
-               echo $form;
-               echo Html::closeElement( 'div' );
-       }
-
-}
diff --git a/resources/skins.minerva.special.userlogin.styles/userlogin.less 
b/resources/skins.minerva.special.userlogin.styles/userlogin.less
index e0a11f8..a9f561a 100644
--- a/resources/skins.minerva.special.userlogin.styles/userlogin.less
+++ b/resources/skins.minerva.special.userlogin.styles/userlogin.less
@@ -16,63 +16,10 @@
        margin: 1em 0;
 }
 
-// FIXME: This should be merged with the .captcha rule in the alpha section
-// once the alpha login page is moved to stable
-.inputs-box,
-.captcha {
-       border: solid 1px @colorGray12;
-       border-radius: 5px;
-       overflow: hidden;
-       background: #fff;
-       margin: 0 0 .8em;
-       text-align: center;
-
-       input:not([type=submit]), img, #wpCaptchaWord {
-               border: none;
-               border-top: solid 1px @colorGray12;
-
-               &:first-child {
-                       border-top: none;
-               }
-       }
-
-       input:not([type=submit]) {
-               -webkit-appearance: none;
-               border-radius: 0;
-               padding: .8em .5em;
-               margin: 0;
-       }
-}
-
-.stable {
-       #mw-mf-login,
-       #mw-mf-accountcreate {
-               // FIXME: Remove when mw-ui in MobileFrontend
-               .mw-ui-block {
-                       display: block;
-                       text-align: center;
-                       padding-bottom: 12px;
-               }
-       }
-
-       /* sign up form */
-       form.user-login {
-               padding-bottom: 12px;
-
-               input {
-                       width: 100%;
-                       display: block;
-               }
-       }
-}
-
-// FIXME: Should be moved into the .captcha class, once the alpha
-// login page is moved to stable
 // FIXME: Move to ConfirmEdit extension
 /* fancycaptcha reload button */
 #mf-captcha-reload-container,
-.beta .confirmedit-captcha-reload,
-.alpha .confirmedit-captcha-reload {
+.confirmedit-captcha-reload {
        border-top: 1px dashed #e1e1e1;
        display: inline-block;
        padding: 14px 25%;
@@ -113,8 +60,7 @@
        }
 }
 
-.beta,
-.alpha {
+.mw-ui-container {
        .mw-ui-vform {
                margin: auto;
                width: auto;
@@ -141,6 +87,27 @@
        .captcha {
                border-radius: 2px;
                margin: .8em 0 0;
+               border: solid 1px @colorGray12;
+               border-radius: 5px;
+               overflow: hidden;
+               background: #fff;
+               text-align: center;
+
+               input:not([type=submit]), img, #wpCaptchaWord {
+                       border: none;
+                       border-top: solid 1px @colorGray12;
+
+                       &:first-child {
+                               border-top: none;
+                       }
+               }
+
+               input:not([type=submit]) {
+                       -webkit-appearance: none;
+                       border-radius: 0;
+                       padding: .8em .5em;
+                       margin: 0;
+               }
 
                // CAPTCHA's are well known by internet users, save the space 
of the explanation
                > p,
@@ -170,83 +137,79 @@
 @media all and (max-width: @wgMFDeviceWidthTablet) {
        @margin: 12px;
 
-       .beta,
-       .alpha {
-               #userloginForm {
-                       // tips are not useful
-                       .prefsectiontip,
-                       // hide help link
-                       #mw-userlogin-help,
-                       // benefits are obvious through the workflows
-                       #wpReason,
-                       // real name in account creation is not so important on 
mobile
-                       #wpRealName,
-                       // Hide keep me logged in checkbox on mobile.
-                       // FIXME: this should be checked by default on mobile. 
Use JavaScript to check this?
-                       .mw-ui-checkbox {
-                               display: none;
-                       }
+       #userloginForm {
+               // tips are not useful
+               .prefsectiontip,
+               // hide help link
+               #mw-userlogin-help,
+               // benefits are obvious through the workflows
+               #wpReason,
+               // real name in account creation is not so important on mobile
+               #wpRealName,
+               // Hide keep me logged in checkbox on mobile.
+               .mw-ui-checkbox {
+                       display: none !important;
+               }
+       }
+
+       // do not show langage link list
+       // FIXME: After the language list is mobile friendly, it can be 
re-enabled - Bug T110403
+       #languagelinks {
+               display: none;
+       }
+
+       // account creation
+       #userlogin2 {
+               .loginPassword {
+                       border-bottom: 0;
                }
 
-               // do not show langage link list
-               // FIXME: After the language list is mobile friendly, it can be 
re-enabled - Bug T110403
-               #languagelinks {
-                       display: none;
+               .mw-ui-checkbox {
+                       margin: @margin 0;
+               }
+       }
+
+       .mw-ui-vform-field {
+               text-align: center;
+       }
+
+       .mw-ui-vform {
+               margin: auto;
+
+               .mw-ui-input {
+                       padding: .8em .5em;
+                       border: none;
                }
 
-               // account creation
-               #userlogin2 {
-                       .loginPassword {
-                               border-bottom: 0;
-                       }
+               // hide on mobile only media queries (placeholder support)
+               .mw-ui-vform-field {
+                       margin-bottom: 0;
 
-                       .mw-ui-checkbox {
+                       .mw-ui-button {
                                margin: @margin 0;
                        }
-               }
 
-               .mw-ui-vform-field {
-                       text-align: center;
-               }
+                       // user can rely on placeholder attributes in fields 
media query support should mean placeholder support
+                       // but don't hide any checkbox labels
+                       > label {
+                               display: none;
+                       }
 
-               .mw-ui-vform {
-                       margin: auto;
-
+                       // Make the inputs look connected in mobile mode
                        .mw-ui-input {
-                               padding: .8em .5em;
-                               border: none;
-                       }
+                               border: solid 1px @colorGrayLight;
 
-                       // hide on mobile only media queries (placeholder 
support)
-                       .mw-ui-vform-field {
-                               margin-bottom: 0;
-
-                               .mw-ui-button {
-                                       margin: @margin 0;
-                               }
-
-                               // user can rely on placeholder attributes in 
fields media query support should mean placeholder support
-                               // but don't hide any checkbox labels
-                               > label {
-                                       display: none;
-                               }
-
-                               // Make the inputs look connected in mobile mode
-                               .mw-ui-input {
-                                       border: solid 1px @colorGrayLight;
-
-                                       #wpEmail,
-                                       &.loginPassword {
-                                               border-top-left-radius: 0;
-                                               border-top-right-radius: 0;
-                                               margin-top: -1px;
-                                       }
+                               #wpEmail,
+                               &.loginPassword {
+                                       border-top-left-radius: 0;
+                                       border-top-right-radius: 0;
+                                       margin-top: -1px;
                                }
                        }
                }
+       }
 
-               #mw-createaccount-another {
-                       margin-top: @margin;
-               }
+       #mw-createaccount-another {
+               margin-top: @margin;
        }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/231146
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I65e943b6dad8bfea994020f9f555bd095da1a171
Gerrit-PatchSet: 10
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to