2023-12-09 14:47:03 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<div class="flex mt-6 mb-10">
|
|
|
|
<div class="w-full md:w-2/3 md:mx-auto md:max-w-md px-4">
|
|
|
|
<h1 class="my-6">
|
|
|
|
Reset Password
|
|
|
|
</h1>
|
|
|
|
<form @submit.prevent="reset" @keydown="form.onKeydown($event)">
|
|
|
|
<alert-success class="mb-4" :form="form" :message="status" />
|
|
|
|
|
|
|
|
<!-- Email -->
|
|
|
|
<text-input name="email" :form="form" label="Email" :required="true" />
|
|
|
|
|
|
|
|
<!-- Password -->
|
|
|
|
<text-input class="mt-8" native-type="password"
|
|
|
|
name="password" :form="form" label="Password" :required="true"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<!-- Password Confirmation-->
|
|
|
|
<text-input class="mt-8" native-type="password"
|
|
|
|
name="password_confirmation" :form="form" label="Confirm Password" :required="true"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<!-- Submit Button -->
|
|
|
|
<v-button class="w-full" :loading="form.busy">
|
|
|
|
Reset Password
|
|
|
|
</v-button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<open-form-footer />
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2024-01-04 17:38:50 +00:00
|
|
|
setup () {
|
2024-01-05 09:47:36 +00:00
|
|
|
definePageMeta({
|
|
|
|
middleware: "guest"
|
|
|
|
})
|
2024-01-04 17:38:50 +00:00
|
|
|
useOpnSeoMeta({
|
|
|
|
title: 'Reset Password'
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
2023-12-09 14:47:03 +00:00
|
|
|
data: () => ({
|
|
|
|
status: '',
|
2023-12-24 19:19:59 +00:00
|
|
|
form: useForm({
|
2023-12-09 14:47:03 +00:00
|
|
|
token: '',
|
|
|
|
email: '',
|
|
|
|
password: '',
|
|
|
|
password_confirmation: ''
|
|
|
|
})
|
|
|
|
}),
|
|
|
|
|
|
|
|
created () {
|
|
|
|
this.form.email = this.$route.query.email
|
|
|
|
this.form.token = this.$route.params.token
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
async reset () {
|
2024-01-12 16:35:16 +00:00
|
|
|
const { data } = await this.form.post('/password/reset')
|
2023-12-09 14:47:03 +00:00
|
|
|
|
|
|
|
this.status = data.status
|
|
|
|
|
|
|
|
this.form.reset()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|