From 0d67317b18409da04c1547084cbed1bd7ad8b35a Mon Sep 17 00:00:00 2001
From: Usama Bin Nadeem <32700508+usamabinnadeem-10@users.noreply.github.com>
Date: Tue, 10 Dec 2024 15:46:51 +0500
Subject: [PATCH] disable submission after the form gets submitted (#14549)
---
templates/credentials/sign-up.html | 9 +++++++++
templates/shared/_credentials-signup-sme-form.html | 2 +-
templates/shared/_credentials-signup-tester-form.html | 3 +--
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/templates/credentials/sign-up.html b/templates/credentials/sign-up.html
index a6575088b52..f0445f3f24a 100644
--- a/templates/credentials/sign-up.html
+++ b/templates/credentials/sign-up.html
@@ -9,6 +9,15 @@
{% endblock meta_copydoc %}
{% block content %}
+
{% if error %}
diff --git a/templates/shared/_credentials-signup-sme-form.html b/templates/shared/_credentials-signup-sme-form.html
index 2adbd6d162a..68357e95948 100644
--- a/templates/shared/_credentials-signup-sme-form.html
+++ b/templates/shared/_credentials-signup-sme-form.html
@@ -795,6 +795,7 @@
Sign-ups for the CUE Beta are now closed
}
function getCustomFields() {
+ disableSubmit();
const nativeLanguage = document.getElementById("NativeLanguage");
const jobTitle = document.getElementById("JobTitle");
@@ -845,7 +846,6 @@ Sign-ups for the CUE Beta are now closed
"ApplicationType": "Exam SME",
"Country": country.value
}
- console.log(data);
const textarea = document.getElementById("Comments_from_lead__c");
textarea.value = JSON.stringify(data);
diff --git a/templates/shared/_credentials-signup-tester-form.html b/templates/shared/_credentials-signup-tester-form.html
index 7e380b35a49..07a6a80cfcd 100644
--- a/templates/shared/_credentials-signup-tester-form.html
+++ b/templates/shared/_credentials-signup-tester-form.html
@@ -768,6 +768,7 @@ Sign-ups for the CUE Beta are now closed
}
function getCustomFields() {
+ disableSubmit();
// disable submit button when form is submitted to stop duplicates
document.getElementById("formSubmitButton").setAttribute("disabled", "true");
@@ -817,8 +818,6 @@ Sign-ups for the CUE Beta are now closed
"Country": country.value
}
- console.log(data);
-
const textarea = document.getElementById("Comments_from_lead__c");
textarea.value = JSON.stringify(data);
}