-
Notifications
You must be signed in to change notification settings - Fork 848
/
Copy pathConfirmPassword.vue
64 lines (54 loc) · 1.86 KB
/
ConfirmPassword.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<script setup>
import { ref } from 'vue';
import { Head, useForm } from '@inertiajs/inertia-vue3';
import JetAuthenticationCard from '@/Components/AuthenticationCard.vue';
import JetAuthenticationCardLogo from '@/Components/AuthenticationCardLogo.vue';
import JetButton from '@/Components/Button.vue';
import JetInput from '@/Components/Input.vue';
import JetLabel from '@/Components/Label.vue';
import JetValidationErrors from '@/Components/ValidationErrors.vue';
const form = useForm({
password: '',
});
const passwordInput = ref(null);
const submit = () => {
form.post(route('password.confirm'), {
onFinish: () => {
form.reset();
passwordInput.value.focus();
},
});
};
</script>
<template>
<Head title="Secure Area" />
<JetAuthenticationCard>
<template #logo>
<JetAuthenticationCardLogo />
</template>
<div class="mb-4 text-sm text-gray-600">
This is a secure area of the application. Please confirm your password before continuing.
</div>
<JetValidationErrors class="mb-4" />
<form @submit.prevent="submit">
<div>
<JetLabel for="password" value="Password" />
<JetInput
id="password"
ref="passwordInput"
v-model="form.password"
type="password"
class="mt-1 block w-full"
required
autocomplete="current-password"
autofocus
/>
</div>
<div class="flex justify-end mt-4">
<JetButton class="ml-4" :class="{ 'opacity-25': form.processing }" :disabled="form.processing">
Confirm
</JetButton>
</div>
</form>
</JetAuthenticationCard>
</template>