From 1d79c1982a43867809151578149106210a46c362 Mon Sep 17 00:00:00 2001 From: Vasiliy Ermolovich Date: Sun, 20 May 2012 22:01:11 +0300 Subject: [PATCH] use implicit partials rendering make simple_form templates consistent with templates that generates by simple_form itself https://github.com/plataformatec/simple_form/commit/612c0067cf0313cd02c33c4870413a15e96a261a --- app/views/devise/confirmations/new.html.erb | 2 +- app/views/devise/passwords/edit.html.erb | 2 +- app/views/devise/passwords/new.html.erb | 2 +- app/views/devise/registrations/new.html.erb | 2 +- app/views/devise/sessions/new.html.erb | 2 +- app/views/devise/unlocks/new.html.erb | 2 +- .../templates/simple_form_for/confirmations/new.html.erb | 6 +++--- .../templates/simple_form_for/passwords/edit.html.erb | 6 +++--- .../templates/simple_form_for/passwords/new.html.erb | 6 +++--- .../templates/simple_form_for/registrations/edit.html.erb | 4 ++-- .../templates/simple_form_for/registrations/new.html.erb | 6 +++--- .../templates/simple_form_for/sessions/new.html.erb | 6 +++--- .../templates/simple_form_for/unlocks/new.html.erb | 6 +++--- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/app/views/devise/confirmations/new.html.erb b/app/views/devise/confirmations/new.html.erb index b7ae403c..81e4472d 100644 --- a/app/views/devise/confirmations/new.html.erb +++ b/app/views/devise/confirmations/new.html.erb @@ -9,4 +9,4 @@
<%= f.submit "Resend confirmation instructions" %>
<% end %> -<%= render :partial => "devise/shared/links" %> \ No newline at end of file +<%= render "devise/shared/links" %> diff --git a/app/views/devise/passwords/edit.html.erb b/app/views/devise/passwords/edit.html.erb index e75c9371..fe620ef4 100644 --- a/app/views/devise/passwords/edit.html.erb +++ b/app/views/devise/passwords/edit.html.erb @@ -13,4 +13,4 @@
<%= f.submit "Change my password" %>
<% end %> -<%= render :partial => "devise/shared/links" %> \ No newline at end of file +<%= render "devise/shared/links" %> diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb index 6c21e9fd..23501646 100644 --- a/app/views/devise/passwords/new.html.erb +++ b/app/views/devise/passwords/new.html.erb @@ -9,4 +9,4 @@
<%= f.submit "Send me reset password instructions" %>
<% end %> -<%= render :partial => "devise/shared/links" %> \ No newline at end of file +<%= render "devise/shared/links" %> diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index d15e275a..9703db37 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb @@ -15,4 +15,4 @@
<%= f.submit "Sign up" %>
<% end %> -<%= render :partial => "devise/shared/links" %> +<%= render "devise/shared/links" %> diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index ff59f7cc..7966ab99 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -14,4 +14,4 @@
<%= f.submit "Sign in" %>
<% end %> -<%= render :partial => "devise/shared/links" %> \ No newline at end of file +<%= render "devise/shared/links" %> diff --git a/app/views/devise/unlocks/new.html.erb b/app/views/devise/unlocks/new.html.erb index c6cdcfe5..e55e82ee 100644 --- a/app/views/devise/unlocks/new.html.erb +++ b/app/views/devise/unlocks/new.html.erb @@ -9,4 +9,4 @@
<%= f.submit "Resend unlock instructions" %>
<% end %> -<%= render :partial => "devise/shared/links" %> \ No newline at end of file +<%= render "devise/shared/links" %> diff --git a/lib/generators/templates/simple_form_for/confirmations/new.html.erb b/lib/generators/templates/simple_form_for/confirmations/new.html.erb index 9b0344e8..c488db71 100644 --- a/lib/generators/templates/simple_form_for/confirmations/new.html.erb +++ b/lib/generators/templates/simple_form_for/confirmations/new.html.erb @@ -3,13 +3,13 @@ <%= simple_form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %> <%= f.error_notification %> -
+
<%= f.input :email, :required => true %>
-
+
<%= f.button :submit, "Resend confirmation instructions" %>
<% end %> -<%= render :partial => "devise/shared/links" %> \ No newline at end of file +<%= render "devise/shared/links" %> diff --git a/lib/generators/templates/simple_form_for/passwords/edit.html.erb b/lib/generators/templates/simple_form_for/passwords/edit.html.erb index be56ee41..149520c5 100644 --- a/lib/generators/templates/simple_form_for/passwords/edit.html.erb +++ b/lib/generators/templates/simple_form_for/passwords/edit.html.erb @@ -6,14 +6,14 @@ <%= f.input :reset_password_token, :as => :hidden %> <%= f.full_error :reset_password_token %> -
+
<%= f.input :password, :label => "New password", :required => true %> <%= f.input :password_confirmation, :label => "Confirm your new password", :required => true %>
-
+
<%= f.button :submit, "Change my password" %>
<% end %> -<%= render :partial => "devise/shared/links" %> \ No newline at end of file +<%= render "devise/shared/links" %> diff --git a/lib/generators/templates/simple_form_for/passwords/new.html.erb b/lib/generators/templates/simple_form_for/passwords/new.html.erb index 56e2906f..de336277 100644 --- a/lib/generators/templates/simple_form_for/passwords/new.html.erb +++ b/lib/generators/templates/simple_form_for/passwords/new.html.erb @@ -3,13 +3,13 @@ <%= simple_form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %> <%= f.error_notification %> -
+
<%= f.input :email, :required => true %>
-
+
<%= f.button :submit, "Send me reset password instructions" %>
<% end %> -<%= render :partial => "devise/shared/links" %> \ No newline at end of file +<%= render "devise/shared/links" %> diff --git a/lib/generators/templates/simple_form_for/registrations/edit.html.erb b/lib/generators/templates/simple_form_for/registrations/edit.html.erb index 15035593..0088fe4f 100644 --- a/lib/generators/templates/simple_form_for/registrations/edit.html.erb +++ b/lib/generators/templates/simple_form_for/registrations/edit.html.erb @@ -3,14 +3,14 @@ <%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %> <%= f.error_notification %> -
+
<%= f.input :email, :required => true, :autofocus => true %> <%= f.input :password, :autocomplete => "off", :hint => "leave it blank if you don't want to change it", :required => false %> <%= f.input :password_confirmation, :required => false %> <%= f.input :current_password, :hint => "we need your current password to confirm your changes", :required => true %>
-
+
<%= f.button :submit, "Update" %>
<% end %> diff --git a/lib/generators/templates/simple_form_for/registrations/new.html.erb b/lib/generators/templates/simple_form_for/registrations/new.html.erb index 5f85c9ba..2665b081 100644 --- a/lib/generators/templates/simple_form_for/registrations/new.html.erb +++ b/lib/generators/templates/simple_form_for/registrations/new.html.erb @@ -3,15 +3,15 @@ <%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %> <%= f.error_notification %> -
+
<%= f.input :email, :required => true, :autofocus => true %> <%= f.input :password, :required => true %> <%= f.input :password_confirmation, :required => true %>
-
+
<%= f.button :submit, "Sign up" %>
<% end %> -<%= render :partial => "devise/shared/links" %> +<%= render "devise/shared/links" %> diff --git a/lib/generators/templates/simple_form_for/sessions/new.html.erb b/lib/generators/templates/simple_form_for/sessions/new.html.erb index e2eab4be..fa53ea87 100644 --- a/lib/generators/templates/simple_form_for/sessions/new.html.erb +++ b/lib/generators/templates/simple_form_for/sessions/new.html.erb @@ -1,15 +1,15 @@

Sign in

<%= simple_form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %> -
+
<%= f.input :email, :required => false, :autofocus => true %> <%= f.input :password, :required => false %> <%= f.input :remember_me, :as => :boolean if devise_mapping.rememberable? %>
-
+
<%= f.button :submit, "Sign in" %>
<% end %> -<%= render :partial => "devise/shared/links" %> \ No newline at end of file +<%= render "devise/shared/links" %> diff --git a/lib/generators/templates/simple_form_for/unlocks/new.html.erb b/lib/generators/templates/simple_form_for/unlocks/new.html.erb index 89011af0..9cce4c3d 100644 --- a/lib/generators/templates/simple_form_for/unlocks/new.html.erb +++ b/lib/generators/templates/simple_form_for/unlocks/new.html.erb @@ -3,13 +3,13 @@ <%= simple_form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %> <%= f.error_notification %> -
+
<%= f.input :email, :required => true %>
-
+
<%= f.button :submit, "Resend unlock instructions" %>
<% end %> -<%= render :partial => "devise/shared/links" %> \ No newline at end of file +<%= render "devise/shared/links" %>