fix(profile): make save button work and verify current password
This commit is contained in:
@@ -342,7 +342,10 @@
|
||||
if (data.name !== undefined) body.name = data.name;
|
||||
if (data.email !== undefined) body.email = data.email;
|
||||
if (data.phone !== undefined) body.phone = data.phone;
|
||||
if (data.password) body.password = data.password;
|
||||
if (data.password) {
|
||||
body.password = data.password;
|
||||
body.old_password = data.oldPassword;
|
||||
}
|
||||
|
||||
setLoading(els.btnSave, true);
|
||||
clearErrors();
|
||||
@@ -903,6 +906,7 @@
|
||||
if (!isPasswordVisible) setDirty('general', generalSnapshot() !== generalBaseline);
|
||||
});
|
||||
|
||||
els.btnSave.addEventListener('click', saveProfile);
|
||||
els.btnCancel.addEventListener('click', () => { loadProfile(); });
|
||||
els.btnLogout.addEventListener('click', () => { doLogout(); });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user