Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions app/views/reactivate_account/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<% title t('titles.reactivate_account') %>

<div class="js-fallback">
<div class="alert alert-warning">
<div class="bold">
<%= t('instructions.account.reactivate.modal.copy') %>
</div>
</div>
</div>

<h1 class="h3 mt0 mb2">
<%= t('headings.account.reactivate') %>
</h1>

<p class="mb4">
<%= t('instructions.account.reactivate.intro') %>
</p>

<h2 class="h4 pb1 border-bottom">
<%= t('instructions.account.reactivate.begin') %>
</h2>

<h3 class="fs-20p sans-serif mt4">
<%= t('instructions.account.reactivate.with_key') %>
</h3>

<p class="mb0">
<%= t('instructions.account.reactivate.explanation') %>
</p>

<div class="scale-down">
<%= render 'partials/personal_key/key', code: 'XXXX-XXXX-XXXX-XXXX' %>
</div>

<div class="block-center center col-10">
<div class="col-12 mb2">
<%= link_to t('links.account.reactivate.with_key'), verify_personal_key_path,
class: 'btn btn-primary block' %>
</div>

<%= form_tag reactivate_account_path, method: :put, class: 'col-12' do %>
<%= button_tag t('links.account.reactivate.without_key'), type: 'submit',
class: 'btn btn-secondary block col-12', id: 'no-key-reactivate' %>
<% end %>
</div>

<%= render 'reactivate_account/modal' %>
29 changes: 0 additions & 29 deletions app/views/reactivate_account/index.html.slim

This file was deleted.

58 changes: 58 additions & 0 deletions app/views/two_factor_authentication/options/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<% title @presenter.title %>

<h1 class="h3 my0">
<%= @presenter.heading %>
</h1>

<p class="mt-tiny mb3">
<%= @presenter.info %>
</p>

<%= validated_form_for(@two_factor_options_form,
html: { autocomplete: 'off', role: 'form' },
method: :post,
url: login_two_factor_options_path) do |f| %>
<div class="mb3">
<fieldset class="m0 p0 border-none">
<legend class="mb2 serif bold">
<%= @presenter.label %>
</legend>
<% @presenter.options.each_with_index do |option, index| %>
<span id="<%= "select_#{option.type}" %>" class="<%= option.html_class %>">
<label class="btn-border col-12 mb2" for="<%= "two_factor_options_form_selection_#{option.type}" %>">
<div class="radio">
<%= radio_button_tag('two_factor_options_form[selection]',
option.type,
index.zero?,
class: option.html_class.to_s) %>
<span class="indicator mt-tiny"></span>
<span class="blue bold fs-20p">
<%= option.label %>
</span>
<div class="regular gray-dark fs-10p mb-tiny">
<%= option.info %>
</div>
</div>
</label>
</span>
<% end %>
</fieldset>
</div>

<%= f.button :submit, t('forms.buttons.continue') %>
<% end %>

<br/>
<% if current_user.decorate.identity_verified? && !FeatureManagement.disallow_ial2_recovery? %>
<p>
<%= @presenter.reverify_link %>
</p>
<% else %>
<p>
<%= @presenter.account_reset_or_cancel_link %>
</p>
<% end %>

<%= render 'shared/cancel', link: destroy_user_session_path %>

<%= javascript_pack_tag 'webauthn-unhide-signin' %>
34 changes: 0 additions & 34 deletions app/views/two_factor_authentication/options/index.html.slim

This file was deleted.

62 changes: 62 additions & 0 deletions app/views/users/backup_code_setup/create.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<% title t('forms.backup_code.title') %>

<h1 class="h3 my0 mt0">
<%= t('forms.backup_code.subtitle') %>
</h1>

<%= t('users.backup_code.generated_on_html',
date: content_tag(:strong, I18n.l(Time.zone.today, format: '%B %d, %Y'))) %>

<br/>
<br/>

<div class="inline-block mb3">
<%= t('forms.backup_code.subinfo_html') %>
</div>

<div class="mb4">
<table>
<tr>
<td class="p0">
<code class="bold h2">
<% @codes[0..@codes.length / 2 - 1].each do |code| %>
<%= code.upcase.insert(8, '-').insert(4, '-') %>
<br/>
<br/>
<% end %>
</code>
</td>
<td>
<code class="bold h2">
<% @codes[@codes.length / 2..-1].each do |code| %>
<%= code.upcase.insert(8, '-').insert(4, '-') %>
<br/>
<br/>
<% end %>
</code>
</td>
</tr>
</table>
<div class="mt0">
<% if desktop_device? %>
<%= link_to t('forms.backup_code.download'), backup_code_download_path,
class: 'text-decoration-none ico btn-border ico-download' %>
<% end %>
<%= link_to t('forms.backup_code.print'), '#',
data: { print: true },
class: 'ico ico-print btn-border ml2 text-decoration-none' -%>
<%= link_to t('links.copy'), '#',
class: 'text-decoration-none ml2 clipboard btn-border ico ico-copy',
data: { "clipboard-text": @codes.join(' ') } -%>
</div>
</div>

<%= form_tag(backup_code_continue_path, method: :patch, role: 'form') do %>
<div class="clearfix mxn1">
<div class="col col-6 sm-col-5 px1">
<%= button_tag t('forms.buttons.continue'), type: 'submit', class: 'btn btn-primary btn-wide' %>
</div>
</div>
<% end %>

<%= javascript_pack_tag 'clipboard' %>
40 changes: 0 additions & 40 deletions app/views/users/backup_code_setup/create.html.slim

This file was deleted.

6 changes: 3 additions & 3 deletions config/locales/forms/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ en:
generate: Get codes
print: Print
regenerate: Get new codes
subinfo: "<b>Don't lose these codes</b>. Download, print, or copy them. Each
code can only be used once. After you’ve used all 10 codes, we’ll give you
10 new codes. Keep your codes as safe as your password."
subinfo_html: "<b>Don't lose these codes</b>. Download, print, or copy them.
Each code can only be used once. After you’ve used all 10 codes, we’ll give
you 10 new codes. Keep your codes as safe as your password."
subtitle: Your backup codes
title: Backup codes
backup_code_regenerate:
Expand Down
4 changes: 2 additions & 2 deletions config/locales/forms/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ es:
generate: Obtener códigos
print: Impresión
regenerate: Obtener nuevos códigos
subinfo: "<b>No pierdas estos códigos</b>. Descarga, imprime, o copialos. Cada
código solo se puede usar una vez. Después de que haya utilizado el décimo
subinfo_html: "<b>No pierdas estos códigos</b>. Descarga, imprime, o copialos.
Cada código solo se puede usar una vez. Después de que haya utilizado el décimo
código, le daremos 10 códigos nuevos. Mantenga sus códigos tan seguros como
una contraseña."
subtitle: Tus códigos de respaldo
Expand Down
2 changes: 1 addition & 1 deletion config/locales/forms/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fr:
generate: Obtenir des codes
print: Impression
regenerate: Obtenir de nouveaux codes
subinfo: "<b>Ne pas perdre ces codes</b>. Téléchargez, imprimez ou copiez-les.
subinfo_html: "<b>Ne pas perdre ces codes</b>. Téléchargez, imprimez ou copiez-les.
Chaque code ne peut être utilisé qu'une seule fois. Une fois que vous avez
utilisé les 10 codes, nous vous en donnons 10 nouveaux. Gardez vos codes aussi
sûr qu'un mot de passe."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'rails_helper'

describe 'reactivate_account/index.html.slim' do
describe 'reactivate_account/index.html.erb' do
it 'displays a fallback warning alert when js is off' do
render

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'rails_helper'

describe 'two_factor_authentication/options/index.html.slim' do
describe 'two_factor_authentication/options/index.html.erb' do
let(:user) { User.new }
before do
allow(view).to receive(:user_session).and_return({})
Expand Down