2015-11-30 21:11:04 +03:00
|
|
|
/*
|
2016-01-07 07:06:39 +03:00
|
|
|
Copyright 2015, 2016 OpenMarket Ltd
|
2017-02-24 14:41:23 +03:00
|
|
|
Copyright 2017 Vector Creations Ltd
|
2018-09-04 20:26:09 +03:00
|
|
|
Copyright 2018 New Vector Ltd
|
2015-11-30 21:11:04 +03:00
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2017-02-24 14:41:23 +03:00
|
|
|
import React from 'react';
|
2017-12-26 04:03:18 +03:00
|
|
|
import PropTypes from 'prop-types';
|
2019-01-24 03:32:36 +03:00
|
|
|
import { fieldInputIncorrect } from '../../../UiEffects';
|
2017-02-24 14:41:23 +03:00
|
|
|
import sdk from '../../../index';
|
|
|
|
import Email from '../../../email';
|
2017-03-14 14:50:13 +03:00
|
|
|
import { looksValid as phoneNumberLooksValid } from '../../../phonenumber';
|
2017-02-24 14:41:23 +03:00
|
|
|
import Modal from '../../../Modal';
|
2017-05-30 17:09:57 +03:00
|
|
|
import { _t } from '../../../languageHandler';
|
2017-11-12 02:46:43 +03:00
|
|
|
import SdkConfig from '../../../SdkConfig';
|
2018-12-14 02:05:34 +03:00
|
|
|
import { SAFE_LOCALPART_REGEX } from '../../../Registration';
|
2015-11-30 21:11:04 +03:00
|
|
|
|
2017-02-24 14:41:23 +03:00
|
|
|
const FIELD_EMAIL = 'field_email';
|
2017-03-14 14:50:13 +03:00
|
|
|
const FIELD_PHONE_NUMBER = 'field_phone_number';
|
2017-02-24 14:41:23 +03:00
|
|
|
const FIELD_USERNAME = 'field_username';
|
|
|
|
const FIELD_PASSWORD = 'field_password';
|
|
|
|
const FIELD_PASSWORD_CONFIRM = 'field_password_confirm';
|
2016-01-15 16:31:41 +03:00
|
|
|
|
2015-11-30 21:11:04 +03:00
|
|
|
/**
|
|
|
|
* A pure UI component which displays a registration form.
|
|
|
|
*/
|
|
|
|
module.exports = React.createClass({
|
|
|
|
displayName: 'RegistrationForm',
|
|
|
|
|
|
|
|
propTypes: {
|
2016-07-07 13:23:08 +03:00
|
|
|
// Values pre-filled in the input boxes when the component loads
|
2017-12-26 04:03:18 +03:00
|
|
|
defaultEmail: PropTypes.string,
|
|
|
|
defaultPhoneCountry: PropTypes.string,
|
|
|
|
defaultPhoneNumber: PropTypes.string,
|
|
|
|
defaultUsername: PropTypes.string,
|
|
|
|
defaultPassword: PropTypes.string,
|
|
|
|
minPasswordLength: PropTypes.number,
|
|
|
|
onError: PropTypes.func,
|
|
|
|
onRegisterClick: PropTypes.func.isRequired, // onRegisterClick(Object) => ?Promise
|
2019-01-30 00:05:15 +03:00
|
|
|
onEditServerDetailsClick: PropTypes.func,
|
2018-09-04 20:50:18 +03:00
|
|
|
flows: PropTypes.arrayOf(PropTypes.object).isRequired,
|
2015-11-30 21:11:04 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
getDefaultProps: function() {
|
|
|
|
return {
|
|
|
|
minPasswordLength: 6,
|
|
|
|
onError: function(e) {
|
|
|
|
console.error(e);
|
2017-10-11 19:56:17 +03:00
|
|
|
},
|
2015-11-30 21:11:04 +03:00
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
getInitialState: function() {
|
|
|
|
return {
|
2017-01-18 14:48:28 +03:00
|
|
|
fieldValid: {},
|
2017-03-14 14:50:13 +03:00
|
|
|
// The ISO2 country code selected in the phone number entry
|
|
|
|
phoneCountry: this.props.defaultPhoneCountry,
|
2015-11-30 21:11:04 +03:00
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
onSubmit: function(ev) {
|
|
|
|
ev.preventDefault();
|
|
|
|
|
2016-01-15 19:17:27 +03:00
|
|
|
// validate everything, in reverse order so
|
|
|
|
// the error that ends up being displayed
|
|
|
|
// is the one from the first invalid field.
|
|
|
|
// It's not super ideal that this just calls
|
|
|
|
// onError once for each invalid field.
|
|
|
|
this.validateField(FIELD_PASSWORD_CONFIRM);
|
|
|
|
this.validateField(FIELD_PASSWORD);
|
|
|
|
this.validateField(FIELD_USERNAME);
|
2017-03-14 14:50:13 +03:00
|
|
|
this.validateField(FIELD_PHONE_NUMBER);
|
2016-01-15 19:17:27 +03:00
|
|
|
this.validateField(FIELD_EMAIL);
|
|
|
|
|
2017-10-11 19:56:17 +03:00
|
|
|
const self = this;
|
2016-01-15 19:17:27 +03:00
|
|
|
if (this.allFieldsValid()) {
|
2016-03-21 04:15:11 +03:00
|
|
|
if (this.refs.email.value == '') {
|
2017-10-11 19:56:17 +03:00
|
|
|
const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
|
2017-07-27 19:19:18 +03:00
|
|
|
Modal.createTrackedDialog('If you don\'t specify an email address...', '', QuestionDialog, {
|
2017-06-08 14:33:29 +03:00
|
|
|
title: _t("Warning!"),
|
2016-03-21 04:15:11 +03:00
|
|
|
description:
|
|
|
|
<div>
|
2017-10-11 19:56:17 +03:00
|
|
|
{ _t("If you don't specify an email address, you won't be able to reset your password. " +
|
|
|
|
"Are you sure?") }
|
2016-03-21 04:15:11 +03:00
|
|
|
</div>,
|
2017-05-30 17:09:57 +03:00
|
|
|
button: _t("Continue"),
|
2016-03-21 04:15:11 +03:00
|
|
|
onFinished: function(confirmed) {
|
|
|
|
if (confirmed) {
|
2017-06-03 17:51:20 +03:00
|
|
|
self._doSubmit(ev);
|
2016-03-21 04:15:11 +03:00
|
|
|
}
|
|
|
|
},
|
2016-01-15 19:17:27 +03:00
|
|
|
});
|
2017-06-03 17:51:20 +03:00
|
|
|
} else {
|
|
|
|
self._doSubmit(ev);
|
2016-03-21 04:15:11 +03:00
|
|
|
}
|
2015-11-30 21:11:04 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2017-06-02 23:34:18 +03:00
|
|
|
_doSubmit: function(ev) {
|
2017-10-11 19:56:17 +03:00
|
|
|
const email = this.refs.email.value.trim();
|
|
|
|
const promise = this.props.onRegisterClick({
|
2017-06-08 22:57:05 +03:00
|
|
|
username: this.refs.username.value.trim(),
|
2016-03-21 04:15:11 +03:00
|
|
|
password: this.refs.password.value.trim(),
|
2017-01-19 12:51:40 +03:00
|
|
|
email: email,
|
2017-03-14 14:50:13 +03:00
|
|
|
phoneCountry: this.state.phoneCountry,
|
2017-10-26 19:22:17 +03:00
|
|
|
phoneNumber: this.refs.phoneNumber ? this.refs.phoneNumber.value.trim() : '',
|
2016-03-21 04:15:11 +03:00
|
|
|
});
|
|
|
|
|
|
|
|
if (promise) {
|
|
|
|
ev.target.disabled = true;
|
|
|
|
promise.finally(function() {
|
|
|
|
ev.target.disabled = false;
|
|
|
|
});
|
2016-08-03 17:59:17 +03:00
|
|
|
}
|
2016-03-21 04:15:11 +03:00
|
|
|
},
|
|
|
|
|
2016-01-15 19:17:27 +03:00
|
|
|
/**
|
2019-01-24 03:32:36 +03:00
|
|
|
* @returns {boolean} true if all fields were valid last time they were validated.
|
2016-01-15 19:17:27 +03:00
|
|
|
*/
|
|
|
|
allFieldsValid: function() {
|
2017-10-11 19:56:17 +03:00
|
|
|
const keys = Object.keys(this.state.fieldValid);
|
|
|
|
for (let i = 0; i < keys.length; ++i) {
|
2016-01-15 19:17:27 +03:00
|
|
|
if (this.state.fieldValid[keys[i]] == false) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
},
|
|
|
|
|
2019-01-24 03:32:36 +03:00
|
|
|
validateField: function(fieldID) {
|
2017-10-11 19:56:17 +03:00
|
|
|
const pwd1 = this.refs.password.value.trim();
|
|
|
|
const pwd2 = this.refs.passwordConfirm.value.trim();
|
2016-01-15 16:31:41 +03:00
|
|
|
|
2019-01-24 03:32:36 +03:00
|
|
|
switch (fieldID) {
|
|
|
|
case FIELD_EMAIL: {
|
2017-01-27 19:31:36 +03:00
|
|
|
const email = this.refs.email.value;
|
2017-02-24 14:41:23 +03:00
|
|
|
const emailValid = email === '' || Email.looksValid(email);
|
2018-09-27 20:53:45 +03:00
|
|
|
if (this._authStepIsRequired('m.login.email.identity') && (!emailValid || email === '')) {
|
2019-01-24 03:32:36 +03:00
|
|
|
this.markFieldValid(fieldID, false, "RegistrationForm.ERR_MISSING_EMAIL");
|
|
|
|
} else this.markFieldValid(fieldID, emailValid, "RegistrationForm.ERR_EMAIL_INVALID");
|
2016-01-15 16:31:41 +03:00
|
|
|
break;
|
2019-01-24 03:32:36 +03:00
|
|
|
}
|
|
|
|
case FIELD_PHONE_NUMBER: {
|
2017-10-26 19:22:17 +03:00
|
|
|
const phoneNumber = this.refs.phoneNumber ? this.refs.phoneNumber.value : '';
|
2017-03-14 14:50:13 +03:00
|
|
|
const phoneNumberValid = phoneNumber === '' || phoneNumberLooksValid(phoneNumber);
|
2018-09-27 20:53:45 +03:00
|
|
|
if (this._authStepIsRequired('m.login.msisdn') && (!phoneNumberValid || phoneNumber === '')) {
|
2019-01-24 03:32:36 +03:00
|
|
|
this.markFieldValid(fieldID, false, "RegistrationForm.ERR_MISSING_PHONE_NUMBER");
|
|
|
|
} else this.markFieldValid(fieldID, phoneNumberValid, "RegistrationForm.ERR_PHONE_NUMBER_INVALID");
|
2017-03-14 14:50:13 +03:00
|
|
|
break;
|
2019-01-24 03:32:36 +03:00
|
|
|
}
|
|
|
|
case FIELD_USERNAME: {
|
2018-12-14 02:05:34 +03:00
|
|
|
const username = this.refs.username.value.trim();
|
|
|
|
if (!SAFE_LOCALPART_REGEX.test(username)) {
|
2016-01-15 16:31:41 +03:00
|
|
|
this.markFieldValid(
|
2019-01-24 03:32:36 +03:00
|
|
|
fieldID,
|
2016-01-15 16:31:41 +03:00
|
|
|
false,
|
2017-10-11 19:56:17 +03:00
|
|
|
"RegistrationForm.ERR_USERNAME_INVALID",
|
2016-01-15 16:31:41 +03:00
|
|
|
);
|
2016-03-15 21:35:09 +03:00
|
|
|
} else if (username == '') {
|
2016-01-15 16:31:41 +03:00
|
|
|
this.markFieldValid(
|
2019-01-24 03:32:36 +03:00
|
|
|
fieldID,
|
2016-01-15 16:31:41 +03:00
|
|
|
false,
|
2017-10-11 19:56:17 +03:00
|
|
|
"RegistrationForm.ERR_USERNAME_BLANK",
|
2016-01-15 16:31:41 +03:00
|
|
|
);
|
|
|
|
} else {
|
2019-01-24 03:32:36 +03:00
|
|
|
this.markFieldValid(fieldID, true);
|
2016-01-15 16:31:41 +03:00
|
|
|
}
|
|
|
|
break;
|
2019-01-24 03:32:36 +03:00
|
|
|
}
|
2016-01-15 16:31:41 +03:00
|
|
|
case FIELD_PASSWORD:
|
|
|
|
if (pwd1 == '') {
|
|
|
|
this.markFieldValid(
|
2019-01-24 03:32:36 +03:00
|
|
|
fieldID,
|
2016-01-15 16:31:41 +03:00
|
|
|
false,
|
2017-10-11 19:56:17 +03:00
|
|
|
"RegistrationForm.ERR_PASSWORD_MISSING",
|
2016-01-15 16:31:41 +03:00
|
|
|
);
|
|
|
|
} else if (pwd1.length < this.props.minPasswordLength) {
|
|
|
|
this.markFieldValid(
|
2019-01-24 03:32:36 +03:00
|
|
|
fieldID,
|
2016-01-15 16:31:41 +03:00
|
|
|
false,
|
2017-10-11 19:56:17 +03:00
|
|
|
"RegistrationForm.ERR_PASSWORD_LENGTH",
|
2016-01-15 16:31:41 +03:00
|
|
|
);
|
|
|
|
} else {
|
2019-01-24 03:32:36 +03:00
|
|
|
this.markFieldValid(fieldID, true);
|
2016-01-15 16:31:41 +03:00
|
|
|
}
|
|
|
|
break;
|
2016-01-15 19:17:27 +03:00
|
|
|
case FIELD_PASSWORD_CONFIRM:
|
|
|
|
this.markFieldValid(
|
2019-01-24 03:32:36 +03:00
|
|
|
fieldID, pwd1 == pwd2,
|
2017-10-11 19:56:17 +03:00
|
|
|
"RegistrationForm.ERR_PASSWORD_MISMATCH",
|
2016-01-15 19:17:27 +03:00
|
|
|
);
|
|
|
|
break;
|
2016-01-15 16:31:41 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2019-01-24 03:32:36 +03:00
|
|
|
markFieldValid: function(fieldID, val, errorCode) {
|
2017-10-11 19:56:17 +03:00
|
|
|
const fieldValid = this.state.fieldValid;
|
2019-01-24 03:32:36 +03:00
|
|
|
fieldValid[fieldID] = val;
|
2016-01-15 16:31:41 +03:00
|
|
|
this.setState({fieldValid: fieldValid});
|
|
|
|
if (!val) {
|
2019-01-24 03:32:36 +03:00
|
|
|
fieldInputIncorrect(this.fieldElementById(fieldID));
|
|
|
|
this.props.onError(errorCode);
|
2016-01-15 16:31:41 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2019-01-24 03:32:36 +03:00
|
|
|
fieldElementById(fieldID) {
|
|
|
|
switch (fieldID) {
|
2016-01-15 16:31:41 +03:00
|
|
|
case FIELD_EMAIL:
|
|
|
|
return this.refs.email;
|
2017-03-14 14:50:13 +03:00
|
|
|
case FIELD_PHONE_NUMBER:
|
|
|
|
return this.refs.phoneNumber;
|
2016-01-15 16:31:41 +03:00
|
|
|
case FIELD_USERNAME:
|
|
|
|
return this.refs.username;
|
|
|
|
case FIELD_PASSWORD:
|
|
|
|
return this.refs.password;
|
|
|
|
case FIELD_PASSWORD_CONFIRM:
|
|
|
|
return this.refs.passwordConfirm;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2019-01-24 03:32:36 +03:00
|
|
|
_classForField: function(fieldID, ...baseClasses) {
|
2017-02-24 14:41:23 +03:00
|
|
|
let cls = baseClasses.join(' ');
|
2019-01-24 03:32:36 +03:00
|
|
|
if (this.state.fieldValid[fieldID] === false) {
|
2016-08-03 17:59:17 +03:00
|
|
|
if (cls) cls += ' ';
|
|
|
|
cls += 'error';
|
2016-01-15 16:31:41 +03:00
|
|
|
}
|
2016-08-03 17:59:17 +03:00
|
|
|
return cls;
|
2016-01-15 16:31:41 +03:00
|
|
|
},
|
|
|
|
|
2017-03-14 14:50:13 +03:00
|
|
|
_onPhoneCountryChange(newVal) {
|
|
|
|
this.setState({
|
2017-04-25 13:21:47 +03:00
|
|
|
phoneCountry: newVal.iso2,
|
|
|
|
phonePrefix: newVal.prefix,
|
2017-03-14 14:50:13 +03:00
|
|
|
});
|
|
|
|
},
|
|
|
|
|
2018-09-04 20:26:09 +03:00
|
|
|
_authStepIsRequired(step) {
|
|
|
|
// A step is required if no flow exists which does not include that step
|
|
|
|
// (Notwithstanding setups like either email or msisdn being required)
|
|
|
|
return !this.props.flows.some((flow) => {
|
|
|
|
return !flow.stages.includes(step);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
2015-11-30 21:11:04 +03:00
|
|
|
render: function() {
|
2017-10-11 19:56:17 +03:00
|
|
|
const self = this;
|
2017-02-24 14:41:23 +03:00
|
|
|
|
2019-01-29 21:23:01 +03:00
|
|
|
let yourMatrixAccountText = _t('Create your account');
|
|
|
|
if (this.props.hsName) {
|
|
|
|
yourMatrixAccountText = _t('Create your %(serverName)s account', {
|
|
|
|
serverName: this.props.hsName,
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
try {
|
|
|
|
const parsedHsUrl = new URL(this.props.hsUrl);
|
|
|
|
yourMatrixAccountText = _t('Create your %(serverName)s account', {
|
|
|
|
serverName: parsedHsUrl.hostname,
|
|
|
|
});
|
|
|
|
} catch (e) {
|
|
|
|
// ignore
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-30 00:05:15 +03:00
|
|
|
let editLink = null;
|
|
|
|
if (this.props.onEditServerDetailsClick) {
|
|
|
|
editLink = <a className="mx_Auth_editServerDetails"
|
|
|
|
href="#" onClick={this.props.onEditServerDetailsClick}
|
|
|
|
>
|
|
|
|
{_t('Edit')}
|
|
|
|
</a>;
|
|
|
|
}
|
|
|
|
|
2019-01-24 03:32:36 +03:00
|
|
|
const emailPlaceholder = this._authStepIsRequired('m.login.email.identity') ?
|
|
|
|
_t("Email address") :
|
|
|
|
_t("Email address (optional)");
|
2017-10-27 03:03:04 +03:00
|
|
|
|
2017-02-24 14:41:23 +03:00
|
|
|
const emailSection = (
|
|
|
|
<div>
|
2017-01-27 19:31:36 +03:00
|
|
|
<input type="text" ref="email"
|
2017-11-16 16:19:36 +03:00
|
|
|
autoFocus={true} placeholder={emailPlaceholder}
|
2017-01-27 19:31:36 +03:00
|
|
|
defaultValue={this.props.defaultEmail}
|
|
|
|
className={this._classForField(FIELD_EMAIL, 'mx_Login_field')}
|
|
|
|
onBlur={function() {self.validateField(FIELD_EMAIL);}}
|
2017-10-11 19:56:17 +03:00
|
|
|
value={self.state.email} />
|
2017-02-24 14:41:23 +03:00
|
|
|
</div>
|
|
|
|
);
|
2015-11-30 21:11:04 +03:00
|
|
|
|
2019-01-22 01:11:10 +03:00
|
|
|
const CountryDropdown = sdk.getComponent('views.auth.CountryDropdown');
|
2017-10-25 04:04:02 +03:00
|
|
|
let phoneSection;
|
2017-11-12 02:46:43 +03:00
|
|
|
if (!SdkConfig.get().disable_3pid_login) {
|
2019-01-24 03:32:36 +03:00
|
|
|
const phonePlaceholder = this._authStepIsRequired('m.login.msisdn') ?
|
|
|
|
_t("Mobile phone number") :
|
|
|
|
_t("Mobile phone number (optional)");
|
2017-10-25 04:04:02 +03:00
|
|
|
phoneSection = (
|
|
|
|
<div className="mx_Login_phoneSection">
|
|
|
|
<CountryDropdown ref="phone_country" onOptionChange={this._onPhoneCountryChange}
|
|
|
|
className="mx_Login_phoneCountry mx_Login_field_prefix"
|
|
|
|
value={this.state.phoneCountry}
|
|
|
|
isSmall={true}
|
|
|
|
showPrefix={true}
|
|
|
|
/>
|
|
|
|
<input type="text" ref="phoneNumber"
|
2018-09-04 20:26:09 +03:00
|
|
|
placeholder={phonePlaceholder}
|
2017-10-25 04:04:02 +03:00
|
|
|
defaultValue={this.props.defaultPhoneNumber}
|
|
|
|
className={this._classForField(
|
|
|
|
FIELD_PHONE_NUMBER,
|
|
|
|
'mx_Login_phoneNumberField',
|
|
|
|
'mx_Login_field',
|
|
|
|
'mx_Login_field_has_prefix',
|
|
|
|
)}
|
|
|
|
onBlur={function() {self.validateField(FIELD_PHONE_NUMBER);}}
|
|
|
|
value={self.state.phoneNumber}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
2017-03-14 14:50:13 +03:00
|
|
|
|
2017-02-24 14:41:23 +03:00
|
|
|
const registerButton = (
|
2017-06-08 14:33:29 +03:00
|
|
|
<input className="mx_Login_submit" type="submit" value={_t("Register")} />
|
2017-02-24 14:41:23 +03:00
|
|
|
);
|
|
|
|
|
2019-01-25 23:25:29 +03:00
|
|
|
const placeholderUsername = _t("Username");
|
2016-03-15 21:35:09 +03:00
|
|
|
|
2015-11-30 21:11:04 +03:00
|
|
|
return (
|
|
|
|
<div>
|
2019-01-30 00:05:15 +03:00
|
|
|
<h3>
|
|
|
|
{yourMatrixAccountText}
|
|
|
|
{editLink}
|
|
|
|
</h3>
|
2015-11-30 21:11:04 +03:00
|
|
|
<form onSubmit={this.onSubmit}>
|
2019-01-30 00:52:12 +03:00
|
|
|
<div className="mx_Auth_fieldRow">
|
|
|
|
<input type="text" ref="username"
|
|
|
|
placeholder={placeholderUsername} defaultValue={this.props.defaultUsername}
|
|
|
|
className={this._classForField(FIELD_USERNAME, 'mx_Login_field')}
|
|
|
|
onBlur={function() {self.validateField(FIELD_USERNAME);}} />
|
|
|
|
</div>
|
|
|
|
<div className="mx_Auth_fieldRow">
|
|
|
|
<input type="password" ref="password"
|
|
|
|
className={this._classForField(FIELD_PASSWORD, 'mx_Login_field')}
|
|
|
|
onBlur={function() {self.validateField(FIELD_PASSWORD);}}
|
|
|
|
placeholder={_t("Password")} defaultValue={this.props.defaultPassword} />
|
|
|
|
<input type="password" ref="passwordConfirm"
|
|
|
|
placeholder={_t("Confirm password")}
|
|
|
|
className={this._classForField(FIELD_PASSWORD_CONFIRM, 'mx_Login_field')}
|
|
|
|
onBlur={function() {self.validateField(FIELD_PASSWORD_CONFIRM);}}
|
|
|
|
defaultValue={this.props.defaultPassword} />
|
|
|
|
</div>
|
|
|
|
<div className="mx_Auth_fieldRow">
|
|
|
|
{ emailSection }
|
|
|
|
{ phoneSection }
|
|
|
|
</div>
|
2017-10-11 19:56:17 +03:00
|
|
|
{ registerButton }
|
2015-11-30 21:11:04 +03:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
);
|
2017-10-11 19:56:17 +03:00
|
|
|
},
|
2015-11-30 21:11:04 +03:00
|
|
|
});
|