wip
This commit is contained in:
@@ -10,14 +10,6 @@
|
||||
|
||||
<!-- Styles -->
|
||||
<link rel="stylesheet" href="/vendor/nova/app.css?id=496e3383c5e2918c7bc875f45870e701">
|
||||
<style>
|
||||
.bg-secondary-500 {
|
||||
background-color: rgb(186,230,253);
|
||||
}
|
||||
.hover:bg-secondary-400 {
|
||||
background-color: rgba(24, 182, 155, 0.5);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="min-w-site text-sm font-medium min-h-full text-gray-500 dark:text-gray-400 bg-gray-100 dark:bg-gray-900">
|
||||
<div class="py-6 px-1 md:px-2 lg:px-6">
|
||||
@@ -36,7 +28,8 @@
|
||||
<svg class="block mx-auto mb-6" xmlns="http://www.w3.org/2000/svg" width="100" height="2" viewBox="0 0 100 2">
|
||||
<path fill="#D8E3EC" d="M0 0h100v2H0z"></path>
|
||||
</svg>
|
||||
<div class="mb-6">
|
||||
|
||||
<div id="username-box" class="mb-6">
|
||||
<label class="block mb-2" for="username">
|
||||
{{ __('Username') }}
|
||||
</label>
|
||||
@@ -51,14 +44,31 @@
|
||||
<span id="username-error-box" class="text-red-500 text-italic error-box"></span>
|
||||
</div>
|
||||
|
||||
<div class="mb-6" id="verification-code-box"></div>
|
||||
|
||||
{{-- <div class="mb-6">
|
||||
<label class="block mb-2" for="password">
|
||||
{{ __('Password') }}
|
||||
<div class="mb-6 hidden" id="verification-code-box">
|
||||
<label class="block mb-2" for="verification">
|
||||
{{ __('Verification code') }}
|
||||
</label>
|
||||
<input class="form-control form-input form-input-bordered w-full" id="password" type="password" name="password" required="">
|
||||
</div> --}}
|
||||
|
||||
<input class="form-control form-input form-input-bordered w-full" id="verification" type="text" name="verification">
|
||||
|
||||
<span id="verification-error-box" class="text-red-500 text-italic error-box"></span>
|
||||
</div>
|
||||
|
||||
<div class="hidden" id="reset-password-container">
|
||||
<div class="mb-6">
|
||||
<label class="block mb-2" for="password">
|
||||
{{ __('Password') }}
|
||||
</label>
|
||||
<input class="form-control form-input form-input-bordered w-full" id="password" type="password" name="password">
|
||||
</div>
|
||||
|
||||
<div class="mb-6">
|
||||
<label class="block mb-2" for="password_confirmation">
|
||||
{{ __('Confirm Password') }}
|
||||
</label>
|
||||
<input class="form-control form-input form-input-bordered w-full" id="password_confirmation" type="password" name="password_confirmation">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="w-full flex justify-center shadow relative bg-primary-500 hover:bg-primary-400 text-white dark:text-gray-900 w-full flex justify-center cursor-pointer rounded text-sm font-bold focus:outline-none focus:ring ring-primary-200 dark:ring-gray-600 inline-flex items-center justify-center h-9 px-3 mb-3 w-full flex justify-center shadow relative bg-primary-500 hover:bg-primary-400 text-white dark:text-gray-900 w-full flex justify-center" type="submit">
|
||||
<span class=""><span>{{ __('Submit') }}</span></span>
|
||||
@@ -70,21 +80,39 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/assets/js/sweetalert2@11.js"></script>
|
||||
<script src="/assets/js/fn.js"></script>
|
||||
<script>
|
||||
async function resetPassword(event) {
|
||||
const response = await postData(event.target.action, getFormData(event))
|
||||
|
||||
if (response.errors) {
|
||||
loopObject(response.errors, item => addValidationClasses(item));
|
||||
loopObject(response.errors, item => addValidationClasses(item))
|
||||
} else {
|
||||
removeValidationClasess()
|
||||
$_ID('verification-code-box').innerHTML = `
|
||||
<label class="block mb-2" for="password">
|
||||
{{ __('Verification code') }}
|
||||
</label>
|
||||
<input class="form-control form-input form-input-bordered w-full" id="password" type="password" name="password" required="">
|
||||
`;
|
||||
|
||||
if (response.step === 1) {
|
||||
$_ID('verification-code-box').classList.remove('hidden')
|
||||
|
||||
Swal.fire({
|
||||
title: '{{ __('Verification code') }}',
|
||||
text: response.message,
|
||||
icon: 'info'
|
||||
})
|
||||
}
|
||||
|
||||
if (response.step === 2) {
|
||||
$_ID('username-box').classList.add('hidden')
|
||||
$_ID('verification-code-box').classList.add('hidden')
|
||||
|
||||
$_ID('reset-password-container').classList.remove('hidden')
|
||||
|
||||
Swal.fire({
|
||||
title: '{{ __('Reset password') }}',
|
||||
text: response.message,
|
||||
icon: 'warning'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user