Skip to content

Commit

Permalink
Render error messages inside the form
Browse files Browse the repository at this point in the history
  • Loading branch information
dankimio committed Aug 20, 2018
1 parent 33cfcfd commit 7797083
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions app/views/devise/confirmations/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<%= bootstrap_devise_error_messages! %>

<h1><%= t('.resend_confirmation_instructions', default: 'Resend confirmation instructions') %></h1>

<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
<%= bootstrap_devise_error_messages! %>

<div class="form-group">
<%= f.label :email %>
<%= f.email_field :email, autofocus: true, class: "form-control" %>
Expand Down
4 changes: 2 additions & 2 deletions app/views/devise/passwords/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<%= bootstrap_devise_error_messages! %>

<h1><%= t('.change_your_password', default: 'Change your password') %></h1>

<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
<%= bootstrap_devise_error_messages! %>

<%= f.hidden_field :reset_password_token %>

<div class="form-group">
Expand Down
4 changes: 2 additions & 2 deletions app/views/devise/passwords/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<%= bootstrap_devise_error_messages! %>

<h1><%= t('.forgot_your_password', default: 'Forgot your password?') %></h1>

<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
<%= bootstrap_devise_error_messages! %>

<div class="form-group">
<%= f.label :email %>
<%= f.email_field :email, autofocus: true, class: 'form-control' %>
Expand Down
4 changes: 2 additions & 2 deletions app/views/devise/registrations/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<%= bootstrap_devise_error_messages! %>

<h1><%= t('.title', resource: resource_class.model_name.human , default: "Edit #{resource_name.to_s.humanize}") %></h1>

<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
<%= bootstrap_devise_error_messages! %>

<div class="form-group">
<%= f.label :email %>
<%= f.email_field :email, autofocus: true, class: 'form-control' %>
Expand Down
4 changes: 2 additions & 2 deletions app/views/devise/registrations/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<%= bootstrap_devise_error_messages! %>

<h1><%= t('.sign_up', default: 'Sign up') %></h1>

<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
<%= bootstrap_devise_error_messages! %>

<div class="form-group">
<%= f.label :email %>
<%= f.email_field :email, autofocus: true, class: 'form-control' %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/devise/sessions/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<h1><%= t('.sign_in', default: 'Sign in') %></h1>


<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<div class="form-group">
<%= f.label :email %>
<%= f.email_field :email, autofocus: true, class: 'form-control' %>
</div>

<div class="form-group">
<%= f.label :password %>
<%= f.password_field :password, autocomplete: 'off', class: 'form-control' %>
Expand Down
4 changes: 2 additions & 2 deletions app/views/devise/unlocks/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<%= bootstrap_devise_error_messages! %>

<h1><%= t('.resend_unlock_instructions', default: 'Resend unlock instructions') %></h1>

<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
<%= bootstrap_devise_error_messages! %>

<div class="form-group">
<%= f.label :email %>
<%= f.email_field :email, autofocus: true, class: 'form-control' %>
Expand Down

0 comments on commit 7797083

Please sign in to comment.