mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
ui: register_form fix
This commit is contained in:
1 parent
3383f5529b
commit
dfd369ba57
2 files changed
+2
-5
No files matched your search
@@ -14,10 +14,7 @@ const formPage = new AutoloadPage('formPage', () => {
|
||||
|
||||
const submitting = {};
|
||||
$(document).on('click', '[type="submit"]', (ev) => {
|
||||
const $dom = $(ev.currentTarget);
|
||||
if ($dom.attr('name') && $dom.attr('value')) return;
|
||||
ev.preventDefault();
|
||||
if (!submitting[ev.currentTarget]) $dom.closest('form').trigger('submit');
|
||||
if (!submitting[ev.currentTarget]) ev.preventDefault();
|
||||
submitting[ev.currentTarget] = true;
|
||||
delay(5000).then(() => { submitting[ev.currentTarget] = false; });
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user