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

View File

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

View File

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

View File

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