Merge remote-tracking branch 'origin/RegisterWizard' into RegisterWizard

This commit is contained in:
Ahmed Bouhuolia
2020-10-11 00:09:17 +02:00
4 changed files with 46 additions and 38 deletions

View File

@@ -19,21 +19,20 @@ import withAuthenticationActions from './withAuthenticationActions';
import { compose } from 'utils';
function ResetPassword({ requestResetPassword }) {
const { formatMessage } = useIntl();
const { token } = useParams();
const history = useHistory();
const ValidationSchema = Yup.object().shape({
password: Yup.string()
.min(4)
.required().label(formatMessage({id:'password'})),
.required()
.label(formatMessage({ id: 'password' })),
confirm_password: Yup.string()
.oneOf([Yup.ref('password'), null])
.required().label(formatMessage({id:'confirm_password'})),
.required()
.label(formatMessage({ id: 'confirm_password' })),
});
const initialValues = useMemo(
@@ -41,7 +40,7 @@ function ResetPassword({ requestResetPassword }) {
password: '',
confirm_password: '',
}),
[]
[],
);
const {
@@ -89,14 +88,14 @@ function ResetPassword({ requestResetPassword }) {
<T id={'choose_a_new_password'} />
</h3>
<T id={'you_remembered_your_password'} />{' '}
<Link to='/auth/login'>
<Link to="/auth/login">
<T id={'login'} />
</Link>
</div>
<form onSubmit={handleSubmit}>
<FormGroup
label={<T id={'password'} />}
label={<T id={'new_password'} />}
intent={errors.password && touched.password && Intent.DANGER}
helperText={
<ErrorMessage name={'password'} {...{ errors, touched }} />
@@ -144,10 +143,10 @@ function ResetPassword({ requestResetPassword }) {
fill={true}
className={'btn-new'}
intent={Intent.PRIMARY}
type='submit'
type="submit"
loading={isSubmitting}
>
<T id={'submit_new_password'} />
<T id={'submit'} />
</Button>
</div>
</form>

View File

@@ -69,13 +69,13 @@ function SendResetPassword({ requestSendResetPassword }) {
return (
<AuthInsider>
<div class='reset-form'>
<div className='reset-form'>
<div className={'authentication-page__label-section'}>
<h3>
<T id={'reset_your_password'} />
<T id={'you_can_t_login'} />
</h3>
<p>
<T id={'we_ll_send_you_a_link_to_reset_your_password'} />
<T id={'we_ll_send_a_recovery_link_to_your_email'} />
</p>
</div>
@@ -104,7 +104,7 @@ function SendResetPassword({ requestSendResetPassword }) {
fill={true}
loading={isSubmitting}
>
<T id={'send_password_reset_link'} />
<T id={'send_reset_password_mail'} />
</Button>
</div>
</form>

View File

@@ -53,10 +53,10 @@ export default {
you_remembered_your_password: 'You remembered your password ?',
new_password: 'New Password',
submit_new_password: 'Submit new password',
reset_your_password: 'Reset Your Password',
we_ll_send_you_a_link_to_reset_your_password:
'Enter your email address and well send you a link to reset your password.',
send_password_reset_link: 'Send password reset link',
you_can_t_login: 'You cant login?',
we_ll_send_a_recovery_link_to_your_email:
'Well send a recovery link to your email.',
send_reset_password_mail: 'Send Reset Password Mail',
return_to_log_in: 'Return to log in',
sub_account: 'Sub account?',
account_type: 'Account Type',
@@ -761,6 +761,7 @@ export default {
welcome: 'Welcome ',
sign_out: 'Sign out',
we_re_here_to_help: 'Were Here to Help!',
date_start_:'Date start',
something_wentwrong:'Something went wrong.'
date_start_: 'Date start',
something_wentwrong: 'Something went wrong.',
new_password: 'New password',
};

View File

@@ -1,10 +1,12 @@
.authentication-insider {
margin-top: 80px;
width: 384px;
margin: 0 auto;
margin-bottom: 40px;
margin-top: 40px;
&__logo-section {
text-align: center;
margin-bottom: 60px;
margin-bottom: 61px;
}
&__content {
@@ -33,24 +35,24 @@
.authentication-page {
&__goto-bigcapital {
position: fixed;
margin-top: 30px;
margin-left: 30px;
margin-top: 40px;
margin-left: 40px;
color: #777;
}
.bp3-input {
min-height: 38px;
// border: 2px solid #E3E3E3;
min-height: 40px;
border: 1px solid #ced4da;
}
// .bp3-form-group{
// margin-bottom: 25px;
.bp3-form-group {
margin-bottom: 25px;
// &.bp3-intent-danger{
// .bp3-input{
// border-color: #eea9a9;
// }
// }
// }
&.bp3-intent-danger {
.bp3-input {
border-color: #eea9a9;
}
}
}
.bp3-form-group.has-password-revealer {
.bp3-label {
@@ -70,7 +72,7 @@
}
&__label-section {
margin-bottom: 34px;
margin-bottom: 29px;
color: #555;
h3 {
@@ -131,9 +133,10 @@
// Login Form
// ------------------------------
.login-form {
width: 690px;
margin: 0px auto;
padding: 85px 50px;
// width: 690px;
// margin: 0px auto;
// padding: 85px 50px;
.checkbox {
&--remember-me {
margin: -4px 0 28px 0px;
@@ -169,6 +172,11 @@
}
}
.send-reset-password {
.form-group--crediential {
margin-bottom: 36px;
}
}
.invite-form {
&__statement-section {
margin-top: -10px;