mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 16:41:42 +00:00
fix: mostrar los errores de devise
This commit is contained in:
parent
b415b3f3cf
commit
40e68da16a
9 changed files with 20 additions and 16 deletions
|
@ -1,6 +1,8 @@
|
|||
= content_for :body do
|
||||
- 'black-bg'
|
||||
|
||||
= render 'devise/shared/error_messages', resource: resource
|
||||
|
||||
.row.align-items-center.justify-content-center.full-height
|
||||
.col-md-4.align-self-center
|
||||
.sr-only
|
||||
|
@ -11,8 +13,6 @@
|
|||
url: confirmation_path(resource_name),
|
||||
html: { method: :post }) do |f|
|
||||
|
||||
= render 'devise/shared/error_messages', resource: resource
|
||||
|
||||
:ruby
|
||||
value = if resource.pending_reconfirmation?
|
||||
resource.unconfirmed_email
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
= content_for :body do
|
||||
- 'black-bg'
|
||||
|
||||
= render 'devise/shared/error_messages', resource: resource
|
||||
|
||||
.row.align-items-center.justify-content-center.full-height
|
||||
.col-md-5.align-self-center
|
||||
%h2= t 'devise.invitations.edit.header'
|
||||
|
@ -8,7 +10,6 @@
|
|||
as: resource_name,
|
||||
url: invitation_path(resource_name),
|
||||
html: { method: :put }) do |f|
|
||||
= render 'devise/shared/error_messages', resource: resource
|
||||
= f.hidden_field :invitation_token, readonly: true
|
||||
- if f.object.class.require_password_on_accepting
|
||||
.form-group
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
= content_for :body do
|
||||
- 'black-bg'
|
||||
|
||||
= render 'devise/shared/error_messages', resource: resource
|
||||
|
||||
.row.align-items-center.justify-content-center.full-height
|
||||
.col-md-5.align-self-center
|
||||
%h2= t 'devise.invitations.new.header'
|
||||
|
@ -8,7 +10,6 @@
|
|||
as: resource_name,
|
||||
url: invitation_path(resource_name),
|
||||
html: { method: :post }) do |f|
|
||||
= render 'devise/shared/error_messages', resource: resource
|
||||
- resource.class.invite_key_fields.each do |field|
|
||||
.form-group
|
||||
= f.label field
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
= content_for :body do
|
||||
- 'black-bg'
|
||||
|
||||
= render 'devise/shared/error_messages', resource: resource
|
||||
|
||||
.row.align-items-center.justify-content-center.full-height
|
||||
.col-md-5.align-self-center
|
||||
.sr-only
|
||||
|
@ -10,7 +12,6 @@
|
|||
= form_for(resource, as: resource_name,
|
||||
url: password_path(resource_name),
|
||||
html: { method: :put }) do |f|
|
||||
= render 'devise/shared/error_messages', resource: resource
|
||||
|
||||
= f.hidden_field :reset_password_token
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
= content_for :body do
|
||||
- 'black-bg'
|
||||
|
||||
= render 'devise/shared/error_messages', resource: resource
|
||||
|
||||
.row.align-items-center.justify-content-center.full-height
|
||||
.col-md-5.align-self-center
|
||||
.sr-only
|
||||
|
@ -11,7 +13,6 @@
|
|||
as: resource_name,
|
||||
url: password_path(resource_name),
|
||||
html: { method: :post }) do |f|
|
||||
= render 'devise/shared/error_messages', resource: resource
|
||||
.form-group
|
||||
= f.label :email, class: 'sr-only'
|
||||
= f.email_field :email, autofocus: true, autocomplete: 'email',
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
= content_for :body do
|
||||
- 'black-bg'
|
||||
|
||||
= render 'devise/shared/error_messages', resource: resource
|
||||
|
||||
.row.align-items-center.justify-content-center.full-height
|
||||
.col-md-6.align-self-center
|
||||
%h2= t('.title')
|
||||
|
@ -11,8 +13,6 @@
|
|||
url: registration_path(resource_name),
|
||||
html: { method: :put }) do |f|
|
||||
|
||||
= render 'devise/shared/error_messages', resource: resource
|
||||
|
||||
.form-group
|
||||
= f.label :email
|
||||
= f.email_field :email, autofocus: true, autocomplete: 'email',
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
= content_for :body do
|
||||
- 'black-bg'
|
||||
|
||||
= render 'devise/shared/error_messages', resource: resource
|
||||
|
||||
.row.align-items-center.justify-content-center.full-height
|
||||
.col-md-5.align-self-center
|
||||
%h2= t('.sign_up')
|
||||
|
@ -10,8 +12,6 @@
|
|||
as: resource_name,
|
||||
url: registration_path(resource_name, params: { locale: params[:locale] })) do |f|
|
||||
|
||||
= render 'devise/shared/error_messages', resource: resource
|
||||
|
||||
.form-group
|
||||
= f.label :email, class: 'sr-only'
|
||||
= f.email_field :email, autofocus: true, autocomplete: 'email',
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
- if resource.errors.any?
|
||||
#error_explanation
|
||||
%h2
|
||||
= render 'bootstrap/alert' do
|
||||
%h4.alert-heading
|
||||
= I18n.t("errors.messages.not_saved", |
|
||||
count: resource.errors.count, |
|
||||
resource: resource.class.model_name.human.downcase) |
|
||||
%ul
|
||||
- resource.errors.full_messages.each do |message|
|
||||
%li= message
|
||||
- resource.errors.full_messages.each do |message|
|
||||
%p= message
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
= content_for :body do
|
||||
- 'black-bg'
|
||||
|
||||
= render 'devise/shared/error_messages', resource: resource
|
||||
|
||||
.row.align-items-center.justify-content-center.full-height
|
||||
.col-md-5.align-self-center
|
||||
.sr-only
|
||||
|
@ -11,7 +13,6 @@
|
|||
as: resource_name,
|
||||
url: unlock_path(resource_name),
|
||||
html: { method: :post }) do |f|
|
||||
= render 'devise/shared/error_messages', resource: resource
|
||||
.form-group
|
||||
= f.label :email, class: 'sr-only'
|
||||
= f.email_field :email, autofocus: true, autocomplete: 'email',
|
||||
|
|
Loading…
Reference in a new issue