opnform/resources/js/pages/auth/password/email.vue

57 lines
1.2 KiB
Vue
Raw Normal View History

2022-09-20 19:59:52 +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">
2023-10-14 16:24:44 +00:00
Reset password
2022-09-20 19:59:52 +00:00
</h1>
<form @submit.prevent="send" @keydown="form.onKeydown($event)">
<alert-success :form="form" :message="status" class="mb-4" />
<!-- Email -->
2023-10-14 16:24:44 +00:00
<text-input name="email" :form="form" label="Email" :required="true" />
2022-09-20 19:59:52 +00:00
<!-- Submit Button -->
<v-button class="w-full" :loading="form.busy">
2023-10-14 16:24:44 +00:00
Send Password Reset Link
2022-09-20 19:59:52 +00:00
</v-button>
</form>
</div>
</div>
<open-form-footer />
</div>
</template>
<script>
import Form from 'vform'
import OpenFormFooter from '../../../components/pages/OpenFormFooter.vue'
import SeoMeta from '../../../mixins/seo-meta.js'
2022-09-20 19:59:52 +00:00
export default {
components: {
OpenFormFooter
},
mixins: [SeoMeta],
2023-10-14 16:24:44 +00:00
middleware: 'guest',
2022-09-20 19:59:52 +00:00
data: () => ({
metaTitle: 'Reset Password',
2022-09-20 19:59:52 +00:00
status: '',
form: new Form({
email: ''
})
}),
methods: {
async send () {
const { data } = await this.form.post('/api/password/email')
this.status = data.status
this.form.reset()
}
}
}
</script>