From a2347dd24178a981174cf68ea18ffec07ad4d1a5 Mon Sep 17 00:00:00 2001 From: iBNu Maksum Date: Wed, 6 Nov 2024 13:50:22 +0700 Subject: [PATCH] enable button after 5 seconds --- ui/ui/customer/footer.tpl | 4 ++++ ui/ui/sections/footer.tpl | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/ui/ui/customer/footer.tpl b/ui/ui/customer/footer.tpl index 7a7129dc..f850d52a 100644 --- a/ui/ui/customer/footer.tpl +++ b/ui/ui/customer/footer.tpl @@ -161,6 +161,10 @@ function ask(field, text){ if (confirm(text)) { + setTimeout(() => { + field.innerHTML = field.innerHTML.replace(``, ''); + field.removeAttribute("disabled"); + }, 5000); return true; } else { setTimeout(() => { diff --git a/ui/ui/sections/footer.tpl b/ui/ui/sections/footer.tpl index e183859e..1270cd55 100644 --- a/ui/ui/sections/footer.tpl +++ b/ui/ui/sections/footer.tpl @@ -114,6 +114,10 @@ function ask(field, text){ if (confirm(text)) { + setTimeout(() => { + field.innerHTML = field.innerHTML.replace(``, ''); + field.removeAttribute("disabled"); + }, 5000); return true; } else { setTimeout(() => {