Skip to content

Commit

Permalink
clearer cta
Browse files Browse the repository at this point in the history
  • Loading branch information
parterburn committed Jan 16, 2024
1 parent 7fc1c6e commit 5d6ddc7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
9 changes: 4 additions & 5 deletions app/views/devise/otp_tokens/_token_secret.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

<% unless current_user.otp_enabled? %>
<hr>
<p><%= I18n.t('explain', :scope => 'devise.otp.token_secret') %></p>
<%= otp_authenticator_token_image(current_user) %>
<br/>
<p style="margin-bottom: 5px;"><label><%= I18n.t('explain', :scope => 'devise.otp.token_secret') %></label></p>
<div style="margin-bottom: 20px;"><%= otp_authenticator_token_image(current_user) %></div>
<!--
<p>
<strong><%= I18n.t('manual_provisioning', :scope => 'devise.otp.token_secret') %>:</strong>
Expand All @@ -15,7 +14,7 @@

<% if current_user.otp_enabled? %>
<%- if recovery_enabled? && current_user.otp_enabled_on > 10.minutes.ago %>
<div class="well" style="margin: 20px auto;">
<div class="alert alert-info force-links" style="margin: 20px auto;">
<h4><%= I18n.t('title', :scope => 'devise.otp.otp_tokens.recovery') %></h4>
<p><%= I18n.t('explain', :scope => 'devise.otp.otp_tokens.recovery') %></p>
<p><%= link_to I18n.t('codes_list', :scope => 'devise.otp.otp_tokens.recovery'), recovery_otp_token_for(resource_name) %></p>
Expand Down Expand Up @@ -45,7 +44,7 @@
</p>
<% else %>
<p>
<%= f.label :token, I18n.t('prompt', :scope => 'devise.otp.submit_token') %><br />
<%= f.label :token, "Step 2: #{I18n.t('prompt', :scope => 'devise.otp.submit_token')}" %><br />
</p>
<% end %>

Expand Down
4 changes: 1 addition & 3 deletions app/views/devise/otp_tokens/recovery.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@
<caption>
<thead>
<tr>
<th><%= I18n.t('sequence', :scope => 'devise.otp.otp_tokens.recovery') %></th>
<th><%= I18n.t('code', :scope => 'devise.otp.otp_tokens.recovery') %></th>
</tr>
</thead>
<tbody>
<%- resource.next_otp_recovery_tokens.each do |seq, code| %>
<tr>
<td><%= seq %></td>
<td><%= code %></td>
<td><strong><%= seq %>:</strong> <%= code %></td>
</tr>
<% end %>
</tbody>
Expand Down
4 changes: 2 additions & 2 deletions config/locales/devise.otp.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ en:
submit_token:
title: 'Two-Factor Authentication Token'
explain: "You're getting this because you enabled two-factor authentication on your account"
prompt: 'Please enter your two-factor authentication token:'
prompt: 'Enter your two-factor authentication token:'
recovery_prompt: 'Please enter your recovery code:'
submit: 'Submit Token'
recovery_link: "I don't have my device, I want to use a recovery code"
Expand All @@ -23,7 +23,7 @@ en:
token: 'Your two-factor authentication token'
token_secret:
title: 'Your token secret'
explain: 'Take a photo of this QR code with your mobile phone to begin the process:'
explain: 'Step 1: Take a photo of this QR code with your mobile phone to begin the process:'
manual_provisioning: 'Manual provisioning code'
reset_otp: 'Reset Your Two-factor Authentication'
reset_explain: 'This will reset your credentials, and disable two-factor authentication.'
Expand Down

0 comments on commit 5d6ddc7

Please sign in to comment.