Skip to content

Commit 53e806a

Browse files
author
Sachin Maheshwari
committed
changes for auth0 Prod
1 parent cfbd80d commit 53e806a

File tree

3 files changed

+56
-58
lines changed

3 files changed

+56
-58
lines changed

web-assets/auth0/dev-tenant/UX.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

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

Lines changed: 36 additions & 36 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>
@@ -118,7 +122,7 @@
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
}
@@ -322,27 +319,30 @@
322319
});
323320

324321
lock.on('signup ready', function () {
325-
var mediaQuery = window.matchMedia('(min-width: 1156px)');
326-
updateSignUp(regSource);
327-
mediaQuery.addListener(updateSignUp);
322+
var mediaQuery = window.matchMedia('(min-width: 1156px)');
323+
updateSignUp(regSource);
324+
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);
328333
try {
329-
const firstNameDiv =
330-
document.getElementById("1-firstName").parentNode.parentNode;
331-
const lastNameDiv =
332-
document.getElementById("1-lastName").parentNode.parentNode;
333-
const emailDiv = document.getElementById("1-email").parentNode.parentNode;
334-
emailDiv.parentNode.insertBefore(firstNameDiv, emailDiv);
335-
emailDiv.parentNode.insertBefore(lastNameDiv, emailDiv);
336-
try {
337-
document.getElementsByName("password")[0].placeholder = "Create a Password";
338-
//document.getElementById("1-country").value = "Select your country (current location)";
339-
} catch (e) {
340-
console.log("Error occured in changing placeholder text", e);
341-
}
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);*/
342338
} catch (e) {
343-
console.log("Error occured in form re-ordering", e);
339+
console.log("Error occured in changing placeholder text", e);
344340
}
345-
});
341+
342+
} catch (e) {
343+
console.log("Error occured in form re-ordering", e);
344+
}
345+
});
346346

347347
lock.show();
348348

@@ -412,14 +412,14 @@
412412

413413
</script>
414414
<script>
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-
}();
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+
}();
422422
</script>
423423
</body>
424424

425-
</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();

0 commit comments

Comments
 (0)