Files
opnform-host-nginx/resources/js/pages/auth/password/email.vue
Chirag 970893329b Migrate to Vite (#71)
* Replace DateInput

* Migrate to Vite

* Ecxluding optimize to fix notifs in dev

* Dateinput changes

* Fixs on new DateInput

* wip

* Updated date input + cleaning

* Udpated readme

Co-authored-by: Julien Nahum <julien@nahum.net>
2023-01-21 12:57:37 +01:00

57 lines
1.2 KiB
Vue

<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">
{{ $t('reset_password') }}
</h1>
<form @submit.prevent="send" @keydown="form.onKeydown($event)">
<alert-success :form="form" :message="status" class="mb-4" />
<!-- Email -->
<text-input name="email" :form="form" :label="$t('email')" :required="true" />
<!-- Submit Button -->
<v-button class="w-full" :loading="form.busy">
{{ $t('send_password_reset_link') }}
</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'
export default {
middleware: 'guest',
components: {
OpenFormFooter
},
mixins: [SeoMeta],
data: () => ({
metaTitle: 'Reset Password',
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>