Skip to content

Commit

Permalink
Fix #862 - Changed user email to alias email in modal message
Browse files Browse the repository at this point in the history
  • Loading branch information
codemist committed Jul 7, 2021
1 parent 2e528b2 commit 91a84db
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
5 changes: 1 addition & 4 deletions privaterelay/locales/en-US/app.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,8 @@ onboarding-tip-3 = Via the context menu, just right-click (Windows) or Control-c
modal-rename-alias-saved = Label saved!
modal-delete-headline = Permanently delete this alias?
# Variables:
# $attrs (string) - specific attributes added to HTML element
# $email (string) - User email address
modal-delete-warning-recovery-html = Once you delete this alias, it cannot be recovered.
{ -brand-name-firefox-relay } will no longer forward messages sent to <span { $attrs }>{ $email }</span>, including messages that allow you to reset lost passwords.
{ -brand-name-firefox-relay } will no longer forward messages sent to <strong></strong> { $email }, including messages that allow you to reset lost passwords.
modal-delete-warning-upgrade = If you use this alias to log in to sites you care about,
you should update your login with a different email address before you delete this one.
modal-delete-confirmation = Yes, I want to delete this alias.
Expand Down
4 changes: 2 additions & 2 deletions privaterelay/templates/includes/modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<div class="modal modal-content drop-shadow-light">
<h2 class="modal-headline">{% ftlmsg 'modal-delete-headline' %}</h2>
<span class="alias-to-delete demi"></span>
<p class="modal-message">{% ftlmsg 'modal-delete-warning-recovery-html' attrs='class="alias-to-delete"' email=request.user.email %}</p>
<p class="warning-text delete-tip modal-message">{% ftlmsg 'modal-delete-warning-upgrade' %}</p>
<p class="modal-message">{% ftlmsg 'modal-delete-warning-recovery-html' %}</p>
<p class="warning-text delete-tip modal-message">{% ftlmsg 'modal-delete-warning-upgrade' email=current_relay_address %}</p>
<div class="flx flx-row checkbox-wrapper">
<input type="checkbox" class="checkbox delete-modal" />
<span class="checkbox-ui"></span>
Expand Down
3 changes: 3 additions & 0 deletions static/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ function deleteAliasConfirmation(submitEvent) {
addressEl.textContent = aliasToDelete;
});

const aliasToDeleteLabel = document.querySelector(".modal-message strong");
aliasToDeleteLabel.textContent = aliasToDelete;

confirmDeleteModal.classList.add("show-modal");
trapFocusInModal("delete-modal", true);
sendGaPing("Dashboard Alias Settings", "Delete Alias", "Delete Alias");
Expand Down

0 comments on commit 91a84db

Please sign in to comment.