24 lines
570 B
JavaScript
24 lines
570 B
JavaScript
(() => {
|
|||
|
|
const tokenInput = document.getElementById('token');
|
||
|
|
const passwordInput = document.getElementById('newPassword');
|
||
|
|
if (
|
||
|
|
!tokenInput ||
|
||
|
|
!passwordInput ||
|
||
|
|
!window.NCAuthForm ||
|
||
|
|
typeof window.NCAuthForm.bindJsonSubmit !== 'function'
|
||
|
|
) {
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
|
||
|
|
window.NCAuthForm.bindJsonSubmit({
|
||
|
|
endpoint: '/auth/reset/perform',
|
||
|
|
formId: 'resetForm',
|
||
|
|
resultId: 'resetDone',
|
||
|
|
buildPayload() {
|
||
|
|
return {
|
||
|
|
token: tokenInput.value,
|
||
|
|
password: passwordInput.value,
|
||
|
|
};
|
||
|
|
},
|
||
|
|
});
|
||
|
|
})();
|