feat: submit all modal forms without page reload

- add a generic AJAX submitter for forms inside dialogs
- keep modal values and show field errors on server validation failure
- soft-refresh the page content on success, preserving scroll, search and filters
- share toast and re-init hooks for tables, markdown, sections and group page
- require passwords and add minlength/match validation on auth forms
This commit is contained in:
2026-10-23 01:22:05 +03:00
parent 2e43f79256
commit e22443b08e
11 changed files with 351 additions and 59 deletions

View File

@@ -192,8 +192,15 @@
});
}
document.addEventListener('DOMContentLoaded', function () {
function init() {
document.querySelectorAll('table.tablekit').forEach(bind);
document.querySelectorAll('input.table-search').forEach(bindSearch);
});
}
window.__lmsInitTablekit = init;
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', init);
} else {
init();
}
})();