diff --git a/res/css/structures/auth/_Login.scss b/res/css/structures/auth/_Login.scss index c32f70a696..240c0713d9 100644 --- a/res/css/structures/auth/_Login.scss +++ b/res/css/structures/auth/_Login.scss @@ -32,10 +32,6 @@ limitations under the License. margin-bottom: 14px; } -.mx_Login_field_disabled { - opacity: 0.3; -} - .mx_Login_fieldLabel { margin-top: -10px; margin-left: 8px; diff --git a/src/components/views/auth/PasswordLogin.js b/src/components/views/auth/PasswordLogin.js index bf1c27e6e3..6021fc911f 100644 --- a/src/components/views/auth/PasswordLogin.js +++ b/src/components/views/auth/PasswordLogin.js @@ -158,10 +158,9 @@ class PasswordLogin extends React.Component { this.props.onPasswordChanged(ev.target.value); } - renderLoginField(loginType, disabled) { + renderLoginField(loginType) { const classes = { mx_Login_field: true, - mx_Login_field_disabled: disabled, }; switch (loginType) { @@ -169,7 +168,7 @@ class PasswordLogin extends React.Component { classes.mx_Login_email = true; classes.error = this.props.loginIncorrect && !this.state.username; return {this._loginField = e;}} key="email_input" type="text" @@ -179,7 +178,6 @@ class PasswordLogin extends React.Component { placeholder="joe@example.com" value={this.state.username} autoFocus - disabled={disabled} />; case PasswordLogin.LOGIN_FIELD_MXID: classes.mx_Login_username = true; @@ -198,7 +196,6 @@ class PasswordLogin extends React.Component { }) : _t("User name")} value={this.state.username} autoFocus - disabled={disabled} />; case PasswordLogin.LOGIN_FIELD_PHONE: { const CountryDropdown = sdk.getComponent('views.auth.CountryDropdown'); @@ -212,7 +209,6 @@ class PasswordLogin extends React.Component { value={this.state.phoneCountry} isSmall={true} showPrefix={true} - disabled={disabled} /> ; } @@ -271,13 +266,12 @@ class PasswordLogin extends React.Component { const pwFieldClass = classNames({ mx_Login_field: true, - mx_Login_field_disabled: matrixIdText === '', error: this.props.loginIncorrect && !this.isLoginEmpty(), // only error password if error isn't top field }); const Dropdown = sdk.getComponent('elements.Dropdown'); - const loginField = this.renderLoginField(this.state.loginType, matrixIdText === ''); + const loginField = this.renderLoginField(this.state.loginType); let loginType; if (!SdkConfig.get().disable_3pid_login) { @@ -287,7 +281,6 @@ class PasswordLogin extends React.Component { { matrixIdText } { _t('Email address') } @@ -297,8 +290,6 @@ class PasswordLogin extends React.Component { ); } - const disableSubmit = this.props.disableSubmit || matrixIdText === ''; - return (
@@ -308,11 +299,14 @@ class PasswordLogin extends React.Component { name="password" value={this.state.password} onChange={this.onPasswordChanged} placeholder={_t('Password')} - disabled={matrixIdText === ''} />
{ forgotPasswordJsx } - +
);