Skip to content

Commit

Permalink
Set treatment branch homepage experiment (including styling updates).…
Browse files Browse the repository at this point in the history
… Note that copy is hard-coded in to bypass l10n efforts.
  • Loading branch information
maxxcrawford committed Apr 22, 2020
1 parent 21a871c commit 82a7145
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
4 changes: 4 additions & 0 deletions public/css/forms.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ input:-webkit-autofill {
margin: 12px auto;
}

.form-desc.experiment {
max-width: 285px;
}

input[type="submit"],
input[type="email"] {
height: 48px;
Expand Down
4 changes: 4 additions & 0 deletions public/js/monitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ function handleFormSubmits(formEvent) {
thisForm.email.value = email;
}
const formClassList = thisForm.classList;
// Growth
if (formClassList.contains("skip")) {
return;
}
if (thisForm.email && !isValidEmail(email)) {
sendPing(thisForm, "Failure");
formClassList.add("invalid");
Expand Down
10 changes: 9 additions & 1 deletion views/partials/forms/scan-email-form.hbs
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@

<form id="scan-user-email" class="email-scan form-group {{ addClasses }}" action="/scan" method="post" data-event-category="Email Scan Form" novalidate>
<form id="scan-user-email" class="email-scan form-group {{#if experimentBranchB}}skip{{/if}} {{ addClasses }}" action="/scan" method="post" data-event-category="Email Scan Form" novalidate>
<input type="hidden" name="_csrf" value="{{ csrfToken }}">
<input type="hidden" name="pageToken" value="{{ pageToken }}">
<input type="hidden" name="scannedEmailId" value="">
{{#unless experimentBranchB}}
<div class="input-group">
<input id="scan-email" class="input-group-field email-to-hash" type="email" name="email" placeholder="{{ getString "scan-placeholder" }}" aria-label="{{ getString "scan-placeholder" }}" autocomplete="off" />
<span id="invalid-email-message" class="error-message">{{ getString "scan-error" }}</span>
</div>
{{/unless}}
<input type="hidden" name="emailHash" />
{{#if scanFeaturedBreach}}
<input id="featured" type="hidden" name="featuredBreach" value="{{ featuredBreach.Name }}"/>
{{/if}}
<div class="input-group-button">
{{#if featuredBreach}}
<input type="submit" value="{{ getString "find-out" }}"/>
{{else if experimentBranchB}}
<input type="submit" class="open-oauth" value="Create a Free Account"/>
{{else}}
<input type="submit" value="{{ getString "check-for-breaches" }}"/>
{{/if}}
{{> forms/loader }}
</div>
</form>
{{#if isUserInExperiment}}
<p class="paragraph form-desc txt-cntr txt-purple7 experiment">Firefox browser not required for a Firefox Account. You may receive info about Mozilla&nbsp;services.</p>
{{else}}
<p class="paragraph form-desc txt-cntr txt-purple7">{{ getString "search-for-your-email" }}</p>
{{/if}}

0 comments on commit 82a7145

Please sign in to comment.