fix(js): memperbaiki logika send form untuk reset-password
This commit is contained in:
parent
1f50093097
commit
3c3babe053
@ -19,7 +19,10 @@ $(document).ready(function () {
|
||||
|
||||
$(document).on("click", ".reset-password", function (e) {
|
||||
e.preventDefault();
|
||||
const url = $(this).attr('href');
|
||||
const form = $(this).closest("form");
|
||||
if (!form.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
Swal.fire({
|
||||
title: 'Permohonan Reset Kata Sandi',
|
||||
@ -30,7 +33,7 @@ $(document).ready(function () {
|
||||
cancelButtonText: 'Batal'
|
||||
}).then(function (result) {
|
||||
if (result.isConfirmed) {
|
||||
window.location.href = url;
|
||||
form[0].submit();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user