change password

This commit is contained in:
akosse committed 2020-01-22 12:18:03 +03:00
1 parent cb10af1bce
commit 8322d58066
8 files changed
+78 -12

No files matched your search

+4
View File
@@ -118,3 +118,7 @@ a.desc:after {
.nav > li > form > button.logout:focus {
outline: none;
}
.custom-input {
width: 50%;
}
+24
View File
@@ -0,0 +1,24 @@
$(document).on("beforeSubmit", "#password-form", function (e) {
let form = $(this);
let formData = form.serialize();
let location = document.location.href;
location = location.split('=');
formData = formData.split('=');
console.log(formData[2]);
$.ajax({
url: 'ajax',
type: 'POST',
data: {
id: location[1],
password: formData[2],
},
password: formData[2],
success: function (response) {
window.location.replace('index');
},
error: function () {
}
});
});