We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 08b643b commit 29692d0Copy full SHA for 29692d0
1 file changed
src/Smartstore.Web/wwwroot/js/smartstore.common.js
@@ -447,6 +447,18 @@
447
return $('meta[name="__rvt"]').attr("content") || $('input[name="__RequestVerificationToken"]').val();
448
};
449
450
+ window.disableSubmitTemporarily = function (form, duration = 4000) {
451
+ if (!form) return;
452
+
453
+ const submitButtons = form.querySelectorAll('button[type="submit"], input[type="submit"]');
454
+ submitButtons.forEach(btn => {
455
+ btn.disabled = true;
456
+ setTimeout(() => {
457
+ try { btn.disabled = false; } catch { }
458
+ }, duration);
459
+ });
460
+ }
461
462
/**
463
* Render a JSON object as an HTML tree using <div> rows.
464
* - One <div> per entry/row.
0 commit comments