Commit 42003f531233d0e2c99dd8d217bb5ce228ca22e4

Authored by Dmitriy Zaporozhets
1 parent 6f556d8e

Improve UI/UX for reset_password, signup, confirmation pages

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
app/views/devise/confirmations/new.html.haml
1 1 .login-box
2 2 %h3.page-title Resend confirmation instructions
3 3 = form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f|
4   - = devise_error_messages!
5   - = f.email_field :email, placeholder: 'Email'
6   - %div= f.submit "Resend confirmation instructions", class: 'btn btn-success'
  4 + .devise-errors
  5 + = devise_error_messages!
  6 + = f.email_field :email, placeholder: 'Email', class: "text", required: true
  7 + .clearfix.append-bottom-10
  8 + = f.submit "Resend confirmation instructions", class: 'btn btn-success'
7 9 %hr
8   - = link_to "Sign in", new_session_path(resource_name)
  10 + %p
  11 + %span.light
  12 + Already have login and password?
  13 + %strong
  14 + = link_to "Sign in", new_session_path(resource_name)
... ...
app/views/devise/passwords/edit.html.haml
1 1 = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, class: "login-box" }) do |f|
2 2 %h3 Change your password
3   - = devise_error_messages!
  3 + .devise-errors
  4 + = devise_error_messages!
4 5 = f.hidden_field :reset_password_token
5 6 %div
6   - = f.password_field :password, class: "text top", placeholder: "New password"
  7 + = f.password_field :password, class: "text top", placeholder: "New password", required: true
7 8 %div
8   - = f.password_field :password_confirmation, class: "text bottom", placeholder: "Confirm new password"
  9 + = f.password_field :password_confirmation, class: "text bottom", placeholder: "Confirm new password", required: true
9 10 %div
10 11 .clearfix.append-bottom-10
11 12 = f.submit "Change my password", class: "btn btn-primary"
... ...
app/views/devise/passwords/new.html.haml
1 1 = form_for(resource, as: resource_name, url: password_path(resource_name), html: { class: "login-box", method: :post }) do |f|
2 2 %h3.page-title Reset password
3   - = devise_error_messages!
4   - = f.email_field :email, placeholder: "Email", class: "text"
5   - %br/
6   - %br/
7   - = f.submit "Reset password", class: "btn-primary btn"
8   - .pull-right
9   - = link_to "Sign in", new_session_path(resource_name), class: "btn"
10   - %br/
  3 + .devise-errors
  4 + = devise_error_messages!
  5 + = f.email_field :email, placeholder: "Email", class: "text", required: true
  6 + .clearfix.append-bottom-10
  7 + = f.submit "Reset password", class: "btn-primary btn"
  8 + %hr
  9 + %p
  10 + %span.light
  11 + Already have login and password?
  12 + %strong
  13 + = link_to "Sign in", new_session_path(resource_name)
... ...
app/views/devise/registrations/new.html.haml
1 1 = form_for(resource, as: resource_name, url: registration_path(resource_name), html: { class: "login-box" }) do |f|
2 2 %h3.page-title Sign Up
3   - %br
4   - = devise_error_messages!
  3 + .devise-errors
  4 + = devise_error_messages!
5 5 %div
6 6 = f.text_field :name, class: "text top", placeholder: "Name", required: true
7 7 %div
... ... @@ -15,5 +15,10 @@
15 15 %div
16 16 = f.submit "Sign up", class: "btn-create btn"
17 17 %hr
18   - = link_to "Sign in", new_session_path(resource_name)
19   - = link_to "Forgot your password?", new_password_path(resource_name), class: "pull-right"
  18 + %p
  19 + %span.light
  20 + Have an account?
  21 + %strong
  22 + = link_to "Sign in", new_session_path(resource_name)
  23 + %p
  24 + = link_to "Forgot your password?", new_password_path(resource_name)
... ...
app/views/layouts/devise.html.haml
... ... @@ -11,5 +11,7 @@
11 11 GitLab is open source software to collaborate on code.
12 12 %br
13 13 #{link_to "Sign in", new_user_session_path} or browse for #{link_to "public projects", public_projects_path}.
14   - %hr
  14 + %hr
  15 + .container
  16 + .content
15 17 = yield
... ...