Fix issue with "remember" boolean on login page
This commit is contained in:
parent
9a01ae5e11
commit
5ea932ab90
1 changed files with 12 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
||||||
<div class="p-6 bg-indigo-800 min-h-screen flex justify-center items-center">
|
<div class="p-6 bg-indigo-800 min-h-screen flex justify-center items-center">
|
||||||
<div class="w-full max-w-md">
|
<div class="w-full max-w-md">
|
||||||
<logo class="block mx-auto w-full max-w-xs fill-white" height="50" />
|
<logo class="block mx-auto w-full max-w-xs fill-white" height="50" />
|
||||||
<form class="mt-8 bg-white rounded-lg shadow-xl overflow-hidden" @submit.prevent="form.post(route('login.attempt'))">
|
<form class="mt-8 bg-white rounded-lg shadow-xl overflow-hidden" @submit.prevent="submit">
|
||||||
<div class="px-10 py-12">
|
<div class="px-10 py-12">
|
||||||
<h1 class="text-center font-bold text-3xl">Welcome Back!</h1>
|
<h1 class="text-center font-bold text-3xl">Welcome Back!</h1>
|
||||||
<div class="mx-auto mt-6 w-24 border-b-2" />
|
<div class="mx-auto mt-6 w-24 border-b-2" />
|
||||||
|
@ -39,9 +39,19 @@ export default {
|
||||||
form: this.$inertia.form({
|
form: this.$inertia.form({
|
||||||
email: 'johndoe@example.com',
|
email: 'johndoe@example.com',
|
||||||
password: 'secret',
|
password: 'secret',
|
||||||
remember: null,
|
remember: false,
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
submit() {
|
||||||
|
this.form
|
||||||
|
.transform(data => ({
|
||||||
|
...data,
|
||||||
|
remember: data.remember ? 'on' : '',
|
||||||
|
}))
|
||||||
|
.post(this.route('login.attempt'))
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Reference in a new issue