diff options
author | Bryce Johnson <bryce@gitlab.com> | 2016-09-09 14:21:00 +0200 |
---|---|---|
committer | Bryce Johnson <bryce@gitlab.com> | 2016-10-15 08:27:21 +0200 |
commit | 1dd826d4aad2ce6c195bad24b458b1967b74db1d (patch) | |
tree | eca6776fe8b6221e5db79e6e99f2574cb18b52c9 /app/views/devise/sessions/two_factor.html.haml | |
parent | 602cac526d55d10ef05558c296ce7f27205801cc (diff) | |
download | gitlab-ce-1dd826d4aad2ce6c195bad24b458b1967b74db1d.tar.gz |
Make UX upgrades to SignIn/Register views.
- Tab between register and sign in forms
- Add individual input validation error messages
- Validate username
- Update many styles for all login-box forms
Diffstat (limited to 'app/views/devise/sessions/two_factor.html.haml')
-rw-r--r-- | app/views/devise/sessions/two_factor.html.haml | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/app/views/devise/sessions/two_factor.html.haml b/app/views/devise/sessions/two_factor.html.haml index e623f7cff88..56074c057d7 100644 --- a/app/views/devise/sessions/two_factor.html.haml +++ b/app/views/devise/sessions/two_factor.html.haml @@ -3,20 +3,19 @@ = page_specific_javascript_tag('u2f.js') %div + = render 'devise/shared/tab_single', { :tab_title => 'Two-Factor Authentication' } .login-box - .login-heading - %h3 Two-Factor Authentication .login-body - if @user.two_factor_otp_enabled? - %h5 Authenticate via Two-Factor App - = form_for(resource, as: resource_name, url: session_path(resource_name), method: :post) do |f| + = form_for(resource, as: resource_name, url: session_path(resource_name), method: :post, html: { class: 'edit_user show-gl-field-errors' }) do |f| - resource_params = params[resource_name].presence || params = f.hidden_field :remember_me, value: resource_params.fetch(:remember_me, 0) - = f.text_field :otp_attempt, class: 'form-control', placeholder: 'Two-Factor Authentication code', required: true, autofocus: true, autocomplete: 'off' - %p.help-block.hint Enter the code from the two-factor app on your mobile device. If you've lost your device, you may enter one of your recovery codes. - .prepend-top-20 - = f.submit "Verify code", class: "btn btn-save" + .form-group + = f.label 'Two-Factor Authentication code', name: :otp_attempt + = f.text_field :otp_attempt, class: 'form-control', required: true, autofocus: true, autocomplete: 'off', title: 'This field is required.' + %p.help-block.hint Enter the code from the two-factor app on your mobile device. If you've lost your device, you may enter one of your recovery codes. + .prepend-top-20 + = f.submit "Verify code", class: "btn btn-save" - if @user.two_factor_u2f_enabled? - %hr = render "u2f/authenticate", locals: { params: params, resource: resource, resource_name: resource_name } |