Skip to content

Commit 28bc700

Browse files
author
Sachin Maheshwari
committed
Merge branch 'master' of github.com:topcoder-platform/tc-auth-lib
2 parents 20cea93 + 08dcd97 commit 28bc700

File tree

4 files changed

+61
-35
lines changed

4 files changed

+61
-35
lines changed

web-assets/auth0/dev-tenant/universal-login.html

Lines changed: 36 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta charset="utf-8">
66
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
77
<title>Sign In with Topcoder</title>
8-
<link rel="shortcut icon" type="image/png" href="https://www.topcoder-dev.com/favicon.ico"/>
8+
<link rel="shortcut icon" type="image/png" href="https://www.topcoder-dev.com/favicon.ico" />
99
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
1010
<link rel="preconnect" href="https://fonts.gstatic.com">
1111
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" rel="stylesheet">
@@ -64,7 +64,11 @@
6464
<script src="https://cdn.auth0.com/js/es5-shim.min.js"></script>
6565
<![endif]-->
6666

67+
<!-- <script src="https://tc-public-static-files.topcoder-dev.com/topcoder-auth/js/lock.min_v2.js"></script>
68+
-->
6769
<script src="https://cdn.auth0.com/js/lock/11.30/lock.min.js"></script>
70+
<!-- <script src="https://code.jquery.com/jquery-3.6.0.slim.min.js" integrity="sha256-u7e5khyithlIdTpu22PHhENmPcRdFiHRjhAuHcs05RI=" crossorigin="anonymous"></script>
71+
-->
6872
<script language="javascript" type="text/javascript"
6973
src="https://tc-public-static-files.topcoder.com/topcoder-auth/js/country.js"></script>
7074
<script>
@@ -110,15 +114,15 @@
110114
title: 'Topcoder Login',
111115
emailInputPlaceholder: 'Email',
112116
passwordInputPlaceholder: 'Password',
113-
signUpTerms: 'I agree to the <a href="https://www.topcoder.com/policy/privacy-policy" target="_new"">Privacy Policy</a> of Topcoder.<br/> By clicking "Sign up", you agree to the <a href="https://www.topcoder.com/policy/terms-and-conditions" target="_new">Terms</a> of Topcoder.',
117+
signUpTerms: 'Yes, I understand and agree to the <a href="https://www.topcoder.com/policy/privacy-policy" target="_new"">Privacy Policy</a> and <a href="https://www.topcoder.com/policy/terms-and-conditions" target="_new">Terms</a> of Topcoder.',
114118
signUpTitle: 'Join Topcoder',
115119
signUpLabel: 'Sign Up',
116120
signUpSubmitLabel: 'Sign Up',
117121
signUpWithLabel: '%s',
118122
loginLabel: 'Log In',
119123
loginSubmitLabel: 'Log In',
120124
loginWithLabel: '%s',
121-
usernameInputPlaceholder: 'Username / Handle',
125+
usernameInputPlaceholder: 'Create a Username / Handle',
122126
usernameOrEmailInputPlaceholder: 'Username / Handle',
123127
forgotPasswordAction: 'Forgot your password?'
124128
};
@@ -280,17 +284,10 @@
280284
{
281285
type: "select",
282286
name: "country",
283-
placeholder: "Choose your country",
287+
placeholder: "Select your country (current location)",
284288
options: optionsObj,
285289
// The following properties are optional
286290
prefill: "us"
287-
},
288-
{
289-
name: 'how_did_hear',
290-
placeholder: 'How did you hear about us?',
291-
validator: function () {
292-
return true;
293-
}
294291
}
295292
]
296293
}
@@ -325,6 +322,26 @@
325322
var mediaQuery = window.matchMedia('(min-width: 1156px)');
326323
updateSignUp(regSource);
327324
mediaQuery.addListener(updateSignUp);
325+
try {
326+
const firstNameDiv =
327+
document.getElementById("1-firstName").parentNode.parentNode;
328+
const lastNameDiv =
329+
document.getElementById("1-lastName").parentNode.parentNode;
330+
const emailDiv = document.getElementById("1-email").parentNode.parentNode;
331+
emailDiv.parentNode.insertBefore(firstNameDiv, emailDiv);
332+
emailDiv.parentNode.insertBefore(lastNameDiv, emailDiv);
333+
try {
334+
document.getElementsByName("password")[0].placeholder = "Create a Password";
335+
/*setTimeout(function() {
336+
document.getElementById("1-country").value = "Select your country (current location)"
337+
}, 300);*/
338+
} catch (e) {
339+
console.log("Error occured in changing placeholder text", e);
340+
}
341+
342+
} catch (e) {
343+
console.log("Error occured in form re-ordering", e);
344+
}
328345
});
329346

330347
lock.show();
@@ -395,14 +412,14 @@
395412

396413
</script>
397414
<script>
398-
!function () {
399-
var analytics = window.analytics = window.analytics || []; if (!analytics.initialize) if (analytics.invoked) window.console && console.error && console.error("Segment snippet included twice."); else {
400-
analytics.invoked = !0; analytics.methods = ["trackSubmit", "trackClick", "trackLink", "trackForm", "pageview", "identify", "reset", "group", "track", "ready", "alias", "debug", "page", "once", "off", "on", "addSourceMiddleware", "addIntegrationMiddleware", "setAnonymousId", "addDestinationMiddleware"]; analytics.factory = function (e) { return function () { var t = Array.prototype.slice.call(arguments); t.unshift(e); analytics.push(t); return analytics } }; for (var e = 0; e < analytics.methods.length; e++) { var key = analytics.methods[e]; analytics[key] = analytics.factory(key) } analytics.load = function (key, e) { var t = document.createElement("script"); t.type = "text/javascript"; t.async = !0; t.src = "https://cdn.segment.com/analytics.js/v1/" + key + "/analytics.min.js"; var n = document.getElementsByTagName("script")[0]; n.parentNode.insertBefore(t, n); analytics._loadOptions = e }; analytics._writeKey = "bkPtWMUMTYDhww2zsJluzxtdhtmSsyd9"; analytics.SNIPPET_VERSION = "4.13.2";
401-
analytics.load("bkPtWMUMTYDhww2zsJluzxtdhtmSsyd9");
402-
analytics.page();
403-
}
404-
}();
415+
!function () {
416+
var analytics = window.analytics = window.analytics || []; if (!analytics.initialize) if (analytics.invoked) window.console && console.error && console.error("Segment snippet included twice."); else {
417+
analytics.invoked = !0; analytics.methods = ["trackSubmit", "trackClick", "trackLink", "trackForm", "pageview", "identify", "reset", "group", "track", "ready", "alias", "debug", "page", "once", "off", "on", "addSourceMiddleware", "addIntegrationMiddleware", "setAnonymousId", "addDestinationMiddleware"]; analytics.factory = function (e) { return function () { var t = Array.prototype.slice.call(arguments); t.unshift(e); analytics.push(t); return analytics } }; for (var e = 0; e < analytics.methods.length; e++) { var key = analytics.methods[e]; analytics[key] = analytics.factory(key) } analytics.load = function (key, e) { var t = document.createElement("script"); t.type = "text/javascript"; t.async = !0; t.src = "https://cdn.segment.com/analytics.js/v1/" + key + "/analytics.min.js"; var n = document.getElementsByTagName("script")[0]; n.parentNode.insertBefore(t, n); analytics._loadOptions = e }; analytics._writeKey = "bkPtWMUMTYDhww2zsJluzxtdhtmSsyd9"; analytics.SNIPPET_VERSION = "4.13.2";
418+
analytics.load("bkPtWMUMTYDhww2zsJluzxtdhtmSsyd9");
419+
analytics.page();
420+
}
421+
}();
405422
</script>
406423
</body>
407424

408-
</html>
425+
</html>

web-assets/auth0/prod-tenant/universal-login.html

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,15 @@
110110
title: 'Topcoder Login',
111111
emailInputPlaceholder: 'Email',
112112
passwordInputPlaceholder: 'Password',
113-
signUpTerms: 'I agree to the <a href="https://www.topcoder.com/policy/privacy-policy" target="_new"">Privacy Policy</a> of Topcoder.<br/> By clicking "Sign up", you agree to the <a href="https://www.topcoder.com/policy/terms-and-conditions" target="_new">Terms</a> of Topcoder.',
113+
signUpTerms: 'Yes, I understand and agree to the <a href="https://www.topcoder.com/policy/privacy-policy" target="_new"">Privacy Policy</a> and <a href="https://www.topcoder.com/policy/terms-and-conditions" target="_new">Terms</a> of Topcoder.',
114114
signUpTitle: 'Join Topcoder',
115115
signUpLabel: 'Sign Up',
116116
signUpSubmitLabel: 'Sign Up',
117117
signUpWithLabel: '%s',
118118
loginLabel: 'Log In',
119119
loginSubmitLabel: 'Log In',
120120
loginWithLabel: '%s',
121-
usernameInputPlaceholder: 'Username / Handle',
121+
usernameInputPlaceholder: 'Create a Username / Handle',
122122
usernameOrEmailInputPlaceholder: 'Username / Handle',
123123
forgotPasswordAction: 'Forgot your password?'
124124
};
@@ -326,17 +326,10 @@
326326
{
327327
type: "select",
328328
name: "country",
329-
placeholder: "Choose your country",
329+
placeholder: "Select your country (current location)",
330330
options: optionsObj,
331331
// The following properties are optional
332332
prefill: "us"
333-
},
334-
{
335-
name: 'how_did_hear',
336-
placeholder: 'How did you hear about us?',
337-
validator: function () {
338-
return true;
339-
}
340333
}
341334
]
342335
}
@@ -392,6 +385,23 @@
392385
var mediaQuery = window.matchMedia('(min-width: 1156px)');
393386
updateSignUp(regSource);
394387
mediaQuery.addListener(updateSignUp);
388+
try {
389+
const firstNameDiv =
390+
document.getElementById("1-firstName").parentNode.parentNode;
391+
const lastNameDiv =
392+
document.getElementById("1-lastName").parentNode.parentNode;
393+
const emailDiv = document.getElementById("1-email").parentNode.parentNode;
394+
emailDiv.parentNode.insertBefore(firstNameDiv, emailDiv);
395+
emailDiv.parentNode.insertBefore(lastNameDiv, emailDiv);
396+
try {
397+
document.getElementsByName("password")[0].placeholder = "Create a Password";
398+
//document.getElementById("1-country").value = "Select your country (current location)";
399+
} catch (e) {
400+
console.log("Error occured in changing placeholder text", e);
401+
}
402+
} catch (e) {
403+
console.log("Error occured in form re-ordering", e);
404+
}
395405
});
396406

397407
lock.show();

web-assets/css/styles.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ select::-ms-expand {
521521
font-family: Roboto;
522522
font-size: 14px;
523523
line-height: 22px;
524-
width: 146px;
524+
width: 250px;
525525
text-align: left;
526526
}
527527

web-assets/static-pages/signup.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ <h1 id="page-title-heading" class="page-title-heading">
6363
<input id="utmMedium" name="utmMedium" value="" type="hidden" />
6464
<input id="returnUrl" name="returnUrl" value="" type="hidden" />
6565
<div id="hd" class="input-field active">
66-
<label for="handle">Username / Handle</label>
66+
<label for="handle">Create a Username / Handle</label>
6767
<input
6868
id="handle"
6969
name="handle"
@@ -93,7 +93,7 @@ <h1 id="page-title-heading" class="page-title-heading">
9393
/>
9494
</div>
9595
<div id="cc" class="input-field active">
96-
<label for="country">Choose your country</label>
96+
<label for="country">Select your country (current location)</label>
9797
<select id="country" name="country" class="input-text">
9898
<option value='' ></option>
9999
</select>
@@ -110,9 +110,8 @@ <h1 id="page-title-heading" class="page-title-heading">
110110
<label>
111111
<input id='user_privacy_policy' type="checkbox" value="on" class="input-text user_pripacy_policy">
112112
<span>
113-
I agree to the <a href="https://www.topcoder.com/policy/privacy-policy" target="_new">Privacy Policy</a> of Topcoder.
114-
<br/>
115-
By clicking "Sign up", you agree to the <a href="https://www.topcoder.com/policy/terms-and-conditions"
113+
Yes, I understand and agree to the <a href="https://www.topcoder.com/policy/privacy-policy" target="_new">Privacy Policy</a> and
114+
<a href="https://www.topcoder.com/policy/terms-and-conditions"
116115
target="_blank" rel="noopener noreferrer">Terms</a> of Topcoder.
117116
</span>
118117
</label>

0 commit comments

Comments
 (0)