Skip to content

Commit

Permalink
clean up ui and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ssundahlTTD committed Nov 21, 2024
1 parent e23cfbe commit 9e69805
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 35 deletions.
7 changes: 0 additions & 7 deletions src/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,6 @@ const handleEmailPromptSubmission: RequestHandler<{}, z.infer<typeof EmailPrompt


let idInput = '';
// if (ID_TYPE === 'EUID') {
// if (!isValidEmail(email)) {
// res.render('index', { email, countryList, error: i18n.__('Please enter a valid email address') });
// return;
// }
// idInput = email;
// } else
if (idType === 'email') {
if (!isValidEmail(email)) {
res.render('index', { email, countryList, error: i18n.__('Please enter a valid email address') });
Expand Down
35 changes: 7 additions & 28 deletions views_euid/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<div class='main-content'>
<h1 class='main-content__header'>
{{__ 'euid-portal-title'}}
</h1
</h1>
<div class='main-content__divider'></div>
<p class='main-content__description'>
{{__ 'euid-this-site-allows-you' }}
Expand All @@ -85,26 +85,19 @@
{{__ 'euid-by-entering-your-email-below' }}
</p>
{{#if error}}
<p class='error'>
<p class="error">
{{error}}
{{#if phoneExample}}
<br>
{{__ "For-example"}} {{phoneExample}}
{{/if}}
</p>
{{/if}}
{{#if message}}
<p class='message'>
<p class="message">
{{message}}
</p>
{{/if}}
{{!-- <form class='main-content__form' id='email_prompt' action='/' method='post'>
{{{siteKeyInput}}}
<input type='hidden' name='step' value='email_prompt' />
<input type='hidden' id='recaptcha' name='recaptcha' />
<div class='form__input-container'>
<input type='text' class='form__input' name='email' placeholder='{{__ "Enter your email address"}}' value='{{email}}' />
</div>
<button>
{{__ 'NEXT'}}
</button>
</form> --}}

<form class="main-content__form" id="email_prompt" action="/" method="post">
{{{siteKeyInput}}}
Expand Down Expand Up @@ -151,20 +144,6 @@
<a href='/privacy'>{{__ 'euid-privacy-notice'}}</a>.
</p>
<a target="_blank" href="https://www.thetradedesk.com/us/trust/report-a-vulnerability" class="vulnerability-link">{{__ 'Report-vulnerability'}}</a>
{{!-- <script>
const form = document.getElementById("email_prompt");
form.addEventListener("submit", onSubmit); function onSubmit(e) {
e.preventDefault(); grecaptcha.ready(function () {
const key =
document.getElementById('recpatchaSiteKey').value;
grecaptcha.execute(key, { action: 'email_prompt' }).then(function
(token) {
document.getElementById('recaptcha').value = token;
form.submit();
});
});
}
</script> --}}
<script>
function handleIdTypeClick(idType) {
if (idType.value === "email") {
Expand Down

0 comments on commit 9e69805

Please sign in to comment.