diff --git a/app/views/devise/two_factor_authentication/show.html.erb b/app/views/devise/two_factor_authentication/show.html.erb index 5fab80bda2581319923c14e3fd135c57ccf599da..e200bb69b183fa9beed2eb58dd97691d74c7f1c1 100644 --- a/app/views/devise/two_factor_authentication/show.html.erb +++ b/app/views/devise/two_factor_authentication/show.html.erb @@ -15,39 +15,34 @@ </p> <%= simple_form_for(resource, url: user_two_factor_authentication_path, html: { method: :put, class: 'my-3' }) do |f| %> - <div class="row pure__row--small"> - <div class="col-lg-6"> - <div class="form-inputs"> - <div class="form-group required mt-0"> - <%= text_field_tag :code, - '', - type: 'tel', - pattern: '\d*', - required: true, - autofocus: true, - autocomplete: 'off', - class: 'form-control string required'%> - <p class="mt-2 mb-5"> - <% if resource.direct_otp %> - <%= link_to t('devise.two_factor_authentication.resend_code'), [:resend_code, resource_name, :two_factor_authentication] %> - <% else %> - <%= link_to t('devise.two_factor_authentication.send_code_instead'), [:resend_code, resource_name, :two_factor_authentication] %> - <% end %> - <% unless resource.mobile_phone.blank? # when phone is blank default code method is already :email so we don't need another link %> - • <%= link_to t('devise.two_factor_authentication.send_email_code'), [:resend_code, resource_name, :two_factor_authentication, delivery_method: :email] %> - <% end %> - </p> - </div> - </div> - </div> - <div class="col-lg-6"> - <%= link_to t('devise.shared.links.sign_out'), - destroy_user_session_path, - method: :delete, - class: "btn btn-outline-danger" %> + <div class="form-inputs"> + <div class="input-group required mt-0" style="max-width: 400px"> + <%= text_field_tag :code, + '', + type: 'tel', + pattern: '\d*', + required: true, + autofocus: true, + autocomplete: 'off', + class: 'form-control string required'%> <%= f.button :submit, t('devise.two_factor_authentication.validate'), class: "btn btn-primary" %> </div> + <p class="mt-4 mb-5"> + <% if resource.direct_otp %> + <%= link_to t('devise.two_factor_authentication.resend_code'), [:resend_code, resource_name, :two_factor_authentication] %> + <% else %> + <%= link_to t('devise.two_factor_authentication.send_code_instead'), [:resend_code, resource_name, :two_factor_authentication] %> + <% end %> + <% unless resource.mobile_phone.blank? # when phone is blank default code method is already :email so we don't need another link %> + • <%= link_to t('devise.two_factor_authentication.send_email_code'), [:resend_code, resource_name, :two_factor_authentication, delivery_method: :email] %> + <% end %> + </p> </div> <% end %> + +<%= link_to t('devise.shared.links.sign_out'), + destroy_user_session_path, + method: :delete, + class: "btn btn-outline-danger" %>