Skip to content

Commit 71dd935

Browse files
author
sachin-maheshwari
authored
Merge pull request #142 from topcoder-platform/hotfix/buttonDoubleClick
Hotfix : To prevent double submit for social/enterprise signup
2 parents 149ba97 + 519f128 commit 71dd935

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ workflows:
6666
branches:
6767
only:
6868
- dev
69+
- hotfix/buttonDoubleClick
6970

7071
# Production builds are exectuted only on tagged commits to the
7172
# master branch.

web-assets/js/signup.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22
var apiServerUrl = "https://api.{{DOMAIN}}/v3/users";
3+
var submit_flag = true;
34
var qs = (function (a) {
45
if (a == "") return {};
56
var b = {};
@@ -43,7 +44,7 @@ $(document).ready(function () {
4344
$("#error").html("Error: " + result.result.content.reason);
4445
$("#error").closest(".message").fadeIn();
4546
}
46-
if (result.result.status === 200 && result.result.content.valid) {
47+
if (result.result.status === 200 && result.result.content.valid && submit_flag) {
4748
$("#error").closest(".message").fadeOut();
4849
$("#error").html("");
4950
let formAction = qs["formAction"];
@@ -61,6 +62,7 @@ $(document).ready(function () {
6162
$("#utmCampaign").val(qs["utmCampaign"]);
6263
$("#returnUrl").val(qs["returnUrl"]);
6364
$("#signup").submit();
65+
submit_flag = false;
6466
setContinueButtonDisabledStatus(true);
6567
}
6668
},

0 commit comments

Comments
 (0)