Commit fe07c737aa3cc493cadef90284340924c4db6c98

Authored by Dmitriy Zaporozhets
2 parents dea02363 42003f53

Merge branch 'improve/devise_ui' of /home/git/repositories/gitlab/gitlabhq

app/assets/stylesheets/sections/login.scss
@@ -46,3 +46,10 @@ body.login-page{ @@ -46,3 +46,10 @@ body.login-page{
46 margin: 2px; 46 margin: 2px;
47 } 47 }
48 } 48 }
  49 +
  50 +.devise-errors {
  51 + h2 {
  52 + font-size: 14px;
  53 + color: #a00;
  54 + }
  55 +}
app/views/devise/confirmations/new.html.haml
1 .login-box 1 .login-box
2 %h3.page-title Resend confirmation instructions 2 %h3.page-title Resend confirmation instructions
3 = form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| 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 %hr 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/mailer/confirmation_instructions.html.erb
1 -<p>Welcome <%= @resource.email %>!</p> 1 +<p>Welcome <%= @resource.name %>!</p>
2 2
3 -<p>You can confirm your account through the link below:</p> 3 +<% if @resource.unconfirmed_email.present? %>
  4 + <p>You can confirm your email (<%= @resource.unconfirmed_email %>) through the link below:</p>
  5 +<% else %>
  6 + <p>You can confirm your account through the link below:</p>
  7 +<% end %>
4 8
5 <p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @resource.confirmation_token) %></p> 9 <p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @resource.confirmation_token) %></p>
app/views/devise/passwords/edit.html.haml
1 = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, class: "login-box" }) do |f| 1 = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, class: "login-box" }) do |f|
2 %h3 Change your password 2 %h3 Change your password
3 - = devise_error_messages! 3 + .devise-errors
  4 + = devise_error_messages!
4 = f.hidden_field :reset_password_token 5 = f.hidden_field :reset_password_token
5 %div 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 %div 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 %div 10 %div
10 .clearfix.append-bottom-10 11 .clearfix.append-bottom-10
11 = f.submit "Change my password", class: "btn btn-primary" 12 = f.submit "Change my password", class: "btn btn-primary"
app/views/devise/passwords/new.html.haml
1 = form_for(resource, as: resource_name, url: password_path(resource_name), html: { class: "login-box", method: :post }) do |f| 1 = form_for(resource, as: resource_name, url: password_path(resource_name), html: { class: "login-box", method: :post }) do |f|
2 %h3.page-title Reset password 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 = form_for(resource, as: resource_name, url: registration_path(resource_name), html: { class: "login-box" }) do |f| 1 = form_for(resource, as: resource_name, url: registration_path(resource_name), html: { class: "login-box" }) do |f|
2 %h3.page-title Sign Up 2 %h3.page-title Sign Up
3 - %br  
4 - = devise_error_messages! 3 + .devise-errors
  4 + = devise_error_messages!
5 %div 5 %div
6 = f.text_field :name, class: "text top", placeholder: "Name", required: true 6 = f.text_field :name, class: "text top", placeholder: "Name", required: true
7 %div 7 %div
@@ -15,5 +15,10 @@ @@ -15,5 +15,10 @@
15 %div 15 %div
16 = f.submit "Sign up", class: "btn-create btn" 16 = f.submit "Sign up", class: "btn-create btn"
17 %hr 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/devise/sessions/new.html.haml
@@ -17,14 +17,20 @@ @@ -17,14 +17,20 @@
17 17
18 18
19 = render 'devise/sessions/oauth_providers' if devise_mapping.omniauthable? 19 = render 'devise/sessions/oauth_providers' if devise_mapping.omniauthable?
  20 + %hr
20 21
21 - if gitlab_config.signup_enabled 22 - if gitlab_config.signup_enabled
22 - %hr  
23 - %div  
24 - Don't have an account? 23 + %p
  24 + %span.light
  25 + Don't have an account?
25 %strong 26 %strong
26 = link_to "Sign up", new_registration_path(resource_name) 27 = link_to "Sign up", new_registration_path(resource_name)
27 28
  29 + %p
  30 + %span.light Did not receive confirmation email?
  31 + = link_to "Send again", new_confirmation_path(resource_name)
  32 +
  33 +
28 - if extra_config.has_key?('sign_in_text') 34 - if extra_config.has_key?('sign_in_text')
29 %hr 35 %hr
30 = markdown(extra_config.sign_in_text) 36 = markdown(extra_config.sign_in_text)
app/views/layouts/devise.html.haml
@@ -11,5 +11,7 @@ @@ -11,5 +11,7 @@
11 GitLab is open source software to collaborate on code. 11 GitLab is open source software to collaborate on code.
12 %br 12 %br
13 #{link_to "Sign in", new_user_session_path} or browse for #{link_to "public projects", public_projects_path}. 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 = yield 17 = yield