Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #394 from alphagov/style-2-step
Improve styles of 2-step code entry and locked account pages
- Loading branch information
Showing
12 changed files
with
101 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module BootstrapFlashHelper | ||
def bootstrap_flash_message_keys | ||
[:success, :info, :warning, :danger, :error, :notice, :alert].select { |k| flash[k].present? } | ||
end | ||
|
||
def bootstrap_flash_class(flash_key) | ||
case flash_key | ||
when :notice | ||
"success" | ||
when :error, :alert | ||
"danger" | ||
else | ||
flash_key | ||
end | ||
end | ||
end |
12 changes: 12 additions & 0 deletions
12
app/views/devise/two_factor_authentication/max_login_attempts_reached.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<% content_for :title, "Account locked" %> | ||
<% content_for :thin_form, true %> | ||
|
||
<div class="page-title"> | ||
<h1>Your account is locked</h1> | ||
</div> | ||
|
||
<div class="callout callout-danger"> | ||
<p class="lead remove-bottom-margin"> | ||
Your account has been locked because an incorrect 2-step verification code was entered too many times. | ||
</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<% content_for :title, "2-step verification" %> | ||
<% content_for :thin_form, true %> | ||
<% content_for :suppress_navbar_items, true %> | ||
|
||
<div class="page-title"> | ||
<h1>2-step verification</h1> | ||
</div> | ||
|
||
<%= form_tag([resource_name, :two_factor_authentication], :method => :put) do %> | ||
<div class="panel panel-default"> | ||
<div class="panel-body"> | ||
<div class="form-group"> | ||
<%= label_tag :code, 'Verification code' %> | ||
<p class="text-muted">Use the verification app on your phone to get your code.<br />You won’t need to do this again for 30 days.</p> | ||
<%= text_field_tag :code, nil, | ||
class: 'form-control input-md-4 input-lg', | ||
placeholder: 'Enter 6 digit code', | ||
tabindex: 1, | ||
autofocus: 'autofocus' %> | ||
</div> | ||
</div> | ||
<div class="panel-footer"> | ||
<%= submit_tag "Sign in", tabindex: 2, class: 'btn btn-success btn-lg btn-block' %> | ||
</div> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<% bootstrap_flash_message_keys.each do |k| %> | ||
<div class="alert alert-<%= bootstrap_flash_class(k) %>" | ||
data-module="auto-track-event" | ||
data-track-action="alert-<%= bootstrap_flash_class(k) %>" | ||
data-track-label="<%= strip_tags(flash[k]) %>"> | ||
<%= flash[k] %> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters