Skip to content

Commit

Permalink
adds form labels to 2FA form
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDancingClown committed Aug 2, 2023
1 parent f334638 commit 0a57f95
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 5 deletions.
26 changes: 26 additions & 0 deletions app/views/devise/enable_authy.html.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.page-header
h1
= I18n.t('authy_register_title', scope: 'devise')

= enable_authy_form do
.panel-group
.panel
.panel-body
.form-inputs-group
.form-inputs
.question-group
h2
label.form-label for="authy-countries"
= I18n.t('devise.country')
.row
.col-lg-2.col-md-3.col-sm-4
= text_field_tag :country_code, '', :autocomplete => :off, :placeholder => I18n.t('devise.country'), :id => "authy-countries", wrapper_html: { class: "form-group" }, input_html: { class: "form-control"}
.question-group
h2
label.form-label for="authy-cellphone"
= I18n.t('devise.cellphone')
.row
.col-lg-2.col-md-3.col-sm-4
= text_field_tag :cellphone, 'Mobile number', :autocomplete => :off, :placeholder => I18n.t('devise.cellphone'), :id => "authy-cellphone", wrapper_html: { class: "form-group" }, input_html: { class: "form-control"}
.form-actions
= submit_tag I18n.t('enable_authy', scope: 'devise'), class: 'btn btn-primary btn-md'
16 changes: 11 additions & 5 deletions app/views/layouts/twofactor.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ html.no-js

= yield(:head) if content_for?(:head)

body#admin-layout class="admin-layout #{controller_name}-page #{action_name}-page #{controller_name}-#{action_name}-page #{yield :page_class}"
body#admin-layout data-autosave-token="#{current_admin.try(:autosave_token)}" class="admin-layout #{controller_name}-page #{action_name}-page #{controller_name}-#{action_name}-page #{yield :page_class} #{'layout-dev' if Rails.env.development?}"
#site-wrapper
#site-wrapper-margin
#site-header
a href="#main-container" class="btn btn-lg skip-main-content" onclick="document.getElementById('main-container').focus()" role="button"
| Skip to main content
#site-header.clearfix
.navbar.clearfix role="navigation"
.container
.container.clearfix
.navbar-header
button.navbar-toggle.collapsed type="button" data-toggle="collapse" data-target="#nav-main-collapse"
span.sr-only Toggle navigation
Expand All @@ -45,7 +47,10 @@ html.no-js
= link_to admin_root_path, class:'navbar-brand' do
= image_tag 'logo-admin.png', alt: "King's Awards for Enterprise - Admin"

.navbar-collapse.collapse#nav-main-collapse
.navbar-collapse.collapse#nav-main-collapse.clearfix
ul.nav.navbar-nav
li class=('active' if controller_name == 'dashboard')
= link_to "Dashboard", admin_dashboard_index_path

ul.nav.navbar-nav.navbar-right
li.dropdown
Expand All @@ -57,7 +62,8 @@ html.no-js
= link_to "Sign out",
destroy_admin_session_path,
method: :delete

= render "shared/dev_or_staging_banner"
= render "shared/non_js_banner"

#main-container role="main"
.container
Expand Down

0 comments on commit 0a57f95

Please sign in to comment.