- {this._flagImgForIso2(country.iso2)}
- {country.name}
-
;
- });
-
- // default value here too, otherwise we need to handle null / undefined
- // values between mounting and the initial value propgating
- const value = this.props.value || COUNTRIES[0].iso2;
-
- return
-
A text message has been sent to +{this._msisdn}
-
Please enter the code it contains:
-
-
-
- {this.state.errorText}
-
-
-
- );
- }
- },
-});
-
export const FallbackAuthEntry = React.createClass({
displayName: 'FallbackAuthEntry',
@@ -446,7 +313,6 @@ const AuthEntryComponents = [
PasswordAuthEntry,
RecaptchaAuthEntry,
EmailIdentityAuthEntry,
- MsisdnAuthEntry,
];
export function getEntryComponentForLoginType(loginType) {
diff --git a/src/components/views/login/PasswordLogin.js b/src/components/views/login/PasswordLogin.js
index 61cb3da652..6f6081858b 100644
--- a/src/components/views/login/PasswordLogin.js
+++ b/src/components/views/login/PasswordLogin.js
@@ -1,6 +1,5 @@
/*
Copyright 2015, 2016 OpenMarket Ltd
-Copyright 2017 Vector Creations Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -18,7 +17,6 @@ limitations under the License.
import React from 'react';
import ReactDOM from 'react-dom';
import classNames from 'classnames';
-import sdk from '../../../index';
import {field_input_incorrect} from '../../../UiEffects';
@@ -30,12 +28,8 @@ module.exports = React.createClass({displayName: 'PasswordLogin',
onSubmit: React.PropTypes.func.isRequired, // fn(username, password)
onForgotPasswordClick: React.PropTypes.func, // fn()
initialUsername: React.PropTypes.string,
- initialPhoneCountry: React.PropTypes.string,
- initialPhoneNumber: React.PropTypes.string,
initialPassword: React.PropTypes.string,
onUsernameChanged: React.PropTypes.func,
- onPhoneCountryChanged: React.PropTypes.func,
- onPhoneNumberChanged: React.PropTypes.func,
onPasswordChanged: React.PropTypes.func,
loginIncorrect: React.PropTypes.bool,
},
@@ -44,11 +38,7 @@ module.exports = React.createClass({displayName: 'PasswordLogin',
return {
onUsernameChanged: function() {},
onPasswordChanged: function() {},
- onPhoneCountryChanged: function() {},
- onPhoneNumberChanged: function() {},
initialUsername: "",
- initialPhoneCountry: "",
- initialPhoneNumber: "",
initialPassword: "",
loginIncorrect: false,
};
@@ -58,8 +48,6 @@ module.exports = React.createClass({displayName: 'PasswordLogin',
return {
username: this.props.initialUsername,
password: this.props.initialPassword,
- phoneCountry: this.props.initialPhoneCountry,
- phoneNumber: this.props.initialPhoneNumber,
};
},
@@ -75,12 +63,7 @@ module.exports = React.createClass({displayName: 'PasswordLogin',
onSubmitForm: function(ev) {
ev.preventDefault();
- this.props.onSubmit(
- this.state.username,
- this.state.phoneCountry,
- this.state.phoneNumber,
- this.state.password,
- );
+ this.props.onSubmit(this.state.username, this.state.password);
},
onUsernameChanged: function(ev) {
@@ -88,16 +71,6 @@ module.exports = React.createClass({displayName: 'PasswordLogin',
this.props.onUsernameChanged(ev.target.value);
},
- onPhoneCountryChanged: function(country) {
- this.setState({phoneCountry: country});
- this.props.onPhoneCountryChanged(country);
- },
-
- onPhoneNumberChanged: function(ev) {
- this.setState({phoneNumber: ev.target.value});
- this.props.onPhoneNumberChanged(ev.target.value);
- },
-
onPasswordChanged: function(ev) {
this.setState({password: ev.target.value});
this.props.onPasswordChanged(ev.target.value);
@@ -119,28 +92,13 @@ module.exports = React.createClass({displayName: 'PasswordLogin',
error: this.props.loginIncorrect,
});
- const CountryDropdown = sdk.getComponent('views.login.CountryDropdown');
return (