mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-02-23 13:51:13 +01:00
Use password field component for Reset password form
This commit is contained in:
parent
95554a7034
commit
fc077bf267
@ -26,7 +26,6 @@
|
||||
<form-field :form="registerForm" fieldName="name" inputType="text" :label="$t('auth.forms.name')" :maxLength="255" autofocus />
|
||||
<form-field :form="registerForm" fieldName="email" inputType="email" :label="$t('auth.forms.email')" :maxLength="255" />
|
||||
<form-password-field :form="registerForm" fieldName="password" :showRules="true" :label="$t('auth.forms.password')" />
|
||||
<!-- <form-field :form="registerForm" fieldName="password_confirmation" inputType="password" :label="$t('auth.forms.confirm_password')" /> -->
|
||||
<form-buttons :isBusy="registerForm.isBusy" :isDisabled="registerForm.isDisabled" :caption="$t('auth.register')" :submitId="'btnRegister'" />
|
||||
</form>
|
||||
<div class="nav-links">
|
||||
|
@ -2,8 +2,7 @@
|
||||
<form-wrapper :title="$t('auth.forms.new_password')">
|
||||
<form @submit.prevent="handleSubmit" @keydown="form.onKeydown($event)">
|
||||
<form-field :form="form" fieldName="email" inputType="email" :label="$t('auth.forms.email')" disabled readonly />
|
||||
<form-field :form="form" fieldName="password" inputType="password" :label="$t('auth.forms.new_password')" />
|
||||
<form-field :form="form" fieldName="password_confirmation" inputType="password" :label="$t('auth.forms.confirm_password')" />
|
||||
<form-password-field :form="form" fieldName="password" :autocomplete="'new-password'" :showRules="true" :label="$t('auth.forms.new_password')" />
|
||||
<form-buttons v-if="pending" :isBusy="form.isBusy" :caption="$t('auth.forms.change_password')" :showCancelButton="true" cancelLandingView="login" />
|
||||
<router-link v-if="!pending" id="btnContinue" :to="{ name: 'accounts' }" class="button is-link">{{ $t('commons.continue') }}</router-link>
|
||||
</form>
|
||||
@ -38,6 +37,8 @@
|
||||
handleSubmit(e) {
|
||||
e.preventDefault()
|
||||
|
||||
this.form.password_confirmation = this.form.password
|
||||
|
||||
this.form.post('/user/password/reset', {returnError: true})
|
||||
.then(response => {
|
||||
this.pending = false
|
||||
|
@ -16,8 +16,8 @@
|
||||
<form @submit.prevent="submitPassword" @keydown="formPassword.onKeydown($event)">
|
||||
<h4 class="title is-4 pt-6 has-text-grey-light">{{ $t('settings.change_password') }}</h4>
|
||||
<fieldset :disabled="isRemoteUser">
|
||||
<form-password-field :form="formPassword" fieldName="password" :showRules="true" :label="$t('auth.forms.new_password')" />
|
||||
<form-field :form="formPassword" fieldName="password_confirmation" inputType="password" :label="$t('auth.forms.confirm_new_password')" />
|
||||
<form-password-field :form="formPassword" fieldName="password" :autocomplete="'new-password'" :showRules="true" :label="$t('auth.forms.new_password')" />
|
||||
<form-field :form="formPassword" fieldName="password_confirmation" inputType="password" :autocomplete="'new-password'" :label="$t('auth.forms.confirm_new_password')" />
|
||||
<form-field :form="formPassword" fieldName="currentPassword" inputType="password" :label="$t('auth.forms.current_password.label')" :help="$t('auth.forms.current_password.help')" />
|
||||
<form-buttons :isBusy="formPassword.isBusy" :caption="$t('auth.forms.change_password')" />
|
||||
</fieldset>
|
||||
|
Loading…
Reference in New Issue
Block a user