Skip to content

Commit 1bac804

Browse files
committed
added title to devise views, fixed sign in form styles
1 parent 01dda30 commit 1bac804

9 files changed

Lines changed: 53 additions & 18 deletions

File tree

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1-
input, textarea {
2-
width: 350px;
3-
}
1+
form {
2+
input, textarea {
3+
width: 350px;
4+
}
45

5-
.help-inline {
6-
display: block;
7-
padding-top: 5px;
8-
margin-left: 150px;
9-
}
6+
input.boolean {
7+
margin: 0.75em 0 0 1.5em;
8+
}
109

11-
textarea {
12-
height: 200px;
10+
.help-inline {
11+
display: block;
12+
padding-top: 5px;
13+
margin-left: 150px;
14+
}
15+
16+
textarea {
17+
height: 200px;
18+
}
19+
1320
}

app/views/devise/confirmations/new.html.erb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<h2>Resend confirmation instructions</h2>
1+
<% content_for :title do %>
2+
Resend confirmation instructions
3+
<% end %>
24

35
<%= simple_form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
46
<%= f.error_notification %>

app/views/devise/passwords/edit.html.erb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<h2>Change your password</h2>
1+
<% content_for :title do %>
2+
Change Your Password
3+
<% end %>
24

35
<%= simple_form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
46
<%= f.error_notification %>

app/views/devise/passwords/new.html.erb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<h2>Forgot your password?</h2>
1+
<% content_for :title do %>
2+
Forgot Your Password?
3+
<% end %>
24

35
<%= simple_form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
46
<%= f.error_notification %>

app/views/devise/registrations/edit.html.erb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<h2>Edit <%= resource_name.to_s.humanize %></h2>
1+
<% content_for :title do %>
2+
Edit <%= resource_name.to_s.humanize %>
3+
<% end %>
24

35
<%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
46
<%= f.error_notification %>

app/views/devise/registrations/new.html.erb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<h2>Sign up</h2>
1+
<% content_for :title do %>
2+
Sign Up
3+
<% end %>
24

35
<%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
46
<%= f.error_notification %>
@@ -8,7 +10,7 @@
810
<%= f.input :email %>
911
<%= f.input :password %>
1012
<%= f.input :password_confirmation %>
11-
<%= f.input :about %>
13+
<%= f.input :about, :as => :text %>
1214
</div>
1315

1416
<div class="actions">

app/views/devise/sessions/new.html.haml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
%h2 Sign in
1+
- content_for :title do
2+
Sign In
3+
24
.sign-in
35
= simple_form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f|
46
.inputs
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
= semantic_menu :class => "pills devise" do |root|
2+
- if controller_name != 'sessions'
3+
- root.add "Sign in", new_session_path(resource_name)
4+
- if devise_mapping.registerable? && controller_name != 'registrations'
5+
- root.add "Sign up", new_registration_path(resource_name)
6+
- if devise_mapping.recoverable? && controller_name != 'passwords'
7+
- root.add "Forgot your password?", new_password_path(resource_name)
8+
- if devise_mapping.confirmable? && controller_name != 'confirmations'
9+
- root.add "Didn't receive confirmation instructions?", new_confirmation_path(resource_name)
10+
- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks'
11+
- root.add "Didn't receive unlock instructions?", new_unlock_path(resource_name)
12+
- if devise_mapping.omniauthable?
13+
- resource_class.omniauth_providers.each do |provider|
14+
- root.add "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider)

app/views/devise/unlocks/new.html.erb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<h2>Resend unlock instructions</h2>
1+
<% content_for :title do %>
2+
Resend unlock instructions
3+
<% end %>
24

35
<%= simple_form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
46
<%= f.error_notification %>

0 commit comments

Comments
 (0)