mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01: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 = {};
|
const submitting = {};
|
||||||
$(document).on('click', '[type="submit"]', (ev) => {
|
$(document).on('click', '[type="submit"]', (ev) => {
|
||||||
const $dom = $(ev.currentTarget);
|
if (!submitting[ev.currentTarget]) ev.preventDefault();
|
||||||
if ($dom.attr('name') && $dom.attr('value')) return;
|
|
||||||
ev.preventDefault();
|
|
||||||
if (!submitting[ev.currentTarget]) $dom.closest('form').trigger('submit');
|
|
||||||
submitting[ev.currentTarget] = true;
|
submitting[ev.currentTarget] = true;
|
||||||
delay(5000).then(() => { submitting[ev.currentTarget] = false; });
|
delay(5000).then(() => { submitting[ev.currentTarget] = false; });
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/ui-default",
|
"name": "@hydrooj/ui-default",
|
||||||
"version": "4.6.13",
|
"version": "4.6.14",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"main": "hydro.js",
|
"main": "hydro.js",
|
||||||
|
|||||||
Reference in new issue
Block a user