Commit 66121d6caabb7f5169e4fc21e6bb8938a5ec14b5
1 parent
210e9cd4
Exists in
master
and in
4 other branches
Improve devise views
Showing
4 changed files
with
20 additions
and
21 deletions
Show diff stats
app/assets/stylesheets/sections/login.scss
app/views/devise/passwords/new.html.erb
| 1 | -<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :class => "login-box", :method => :post }) do |f| %> | |
| 2 | - <%= image_tag "login-logo.png", :width => "304", :height => "66", :class => "login-logo", :alt => "Login Logo" %> | |
| 1 | +<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { class: "login-box", method: :post }) do |f| %> | |
| 2 | + <%= image_tag "login-logo.png", width: "304", height: "66", class: "login-logo", alt: "Login Logo" %> | |
| 3 | 3 | <%= devise_error_messages! %> |
| 4 | - <%= f.email_field :email, :placeholder => "Email", :class => "text" %> | |
| 4 | + <%= f.email_field :email, placeholder: "Email", class: "text" %> | |
| 5 | 5 | <br/> |
| 6 | 6 | <br/> |
| 7 | - <%= f.submit "Reset password", :class => "btn-primary btn" %> | |
| 8 | - <div class="right"> <%= link_to "Sign in", new_session_path(resource_name), :class => "btn" %><br /></div> | |
| 7 | + <%= f.submit "Reset password", class: "btn-primary btn" %> | |
| 8 | + <div class="pull-right"> <%= link_to "Sign in", new_session_path(resource_name), class: "btn" %><br /></div> | |
| 9 | 9 | <% end %> | ... | ... |
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| | |
| 2 | - = image_tag "login-logo.png", :width => "304", :height => "66", :class => "login-logo", :alt => "Login Logo" | |
| 1 | += form_for(resource, as: resource_name, url: registration_path(resource_name), html: { class: "login-box" }) do |f| | |
| 2 | + = image_tag "login-logo.png", width: "304", height: "66", class: "login-logo", alt: "Login Logo" | |
| 3 | 3 | = devise_error_messages! |
| 4 | 4 | %div |
| 5 | - = f.text_field :name, :class => "text top", :placeholder => "Name", :required => true | |
| 5 | + = f.text_field :name, class: "text top", placeholder: "Name", required: true | |
| 6 | 6 | %div |
| 7 | - = f.text_field :username, :class => "text middle", :placeholder => "Username", :required => true | |
| 7 | + = f.text_field :username, class: "text middle", placeholder: "Username", required: true | |
| 8 | 8 | %div |
| 9 | - = f.email_field :email, :class => "text middle", :placeholder => "Email", :required => true | |
| 9 | + = f.email_field :email, class: "text middle", placeholder: "Email", required: true | |
| 10 | 10 | %div |
| 11 | - = f.password_field :password, :class => "text middle", :placeholder => "Password", :required => true | |
| 11 | + = f.password_field :password, class: "text middle", placeholder: "Password", required: true | |
| 12 | 12 | %div |
| 13 | - = f.password_field :password_confirmation, :class => "text bottom", :placeholder => "Confirm password", :required => true | |
| 13 | + = f.password_field :password_confirmation, class: "text bottom", placeholder: "Confirm password", required: true | |
| 14 | 14 | %div |
| 15 | - = f.submit "Sign up", :class => "btn-primary btn wide" | |
| 16 | - %br | |
| 15 | + = f.submit "Sign up", class: "btn-create btn" | |
| 17 | 16 | %hr |
| 18 | 17 | = link_to "Sign in", new_session_path(resource_name) |
| 19 | - = link_to "Forgot your password?", new_password_path(resource_name), :class => "right" | |
| 18 | + = link_to "Forgot your password?", new_password_path(resource_name), class: "pull-right" | ... | ... |
app/views/devise/sessions/new.html.haml
| ... | ... | @@ -11,18 +11,18 @@ |
| 11 | 11 | = f.check_box :remember_me |
| 12 | 12 | %span Remember me |
| 13 | 13 | %br/ |
| 14 | - = f.submit "Sign in", :class => "btn-primary btn wide" | |
| 14 | + = f.submit "Sign in", :class => "btn-create btn" | |
| 15 | 15 | .pull-right |
| 16 | 16 | = link_to "Forgot your password?", new_password_path(resource_name), :class => "btn" |
| 17 | 17 | %br/ |
| 18 | - %br/ | |
| 19 | 18 | - if Gitlab.config.gitlab.signup_enabled |
| 20 | 19 | %hr/ |
| 21 | 20 | Don't have an account? |
| 22 | 21 | = link_to "Sign up", new_registration_path(resource_name) |
| 23 | - .clearfix | |
| 24 | 22 | - if devise_mapping.omniauthable? && resource_class.omniauth_providers.present? |
| 23 | + %hr | |
| 25 | 24 | %div |
| 25 | + %span Sign in with: | |
| 26 | 26 | - resource_class.omniauth_providers.each do |provider| |
| 27 | 27 | %span |
| 28 | 28 | = link_to authbutton(provider, 32), omniauth_authorize_path(resource_name, provider) | ... | ... |