mirror of
https://0xacab.org/sutty/sutty
synced 2025-01-19 17:13:39 +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
|
= content_for :body do
|
||||||
- 'black-bg'
|
- 'black-bg'
|
||||||
|
|
||||||
|
= render 'devise/shared/error_messages', resource: resource
|
||||||
|
|
||||||
.row.align-items-center.justify-content-center.full-height
|
.row.align-items-center.justify-content-center.full-height
|
||||||
.col-md-4.align-self-center
|
.col-md-4.align-self-center
|
||||||
.sr-only
|
.sr-only
|
||||||
|
@ -11,8 +13,6 @@
|
||||||
url: confirmation_path(resource_name),
|
url: confirmation_path(resource_name),
|
||||||
html: { method: :post }) do |f|
|
html: { method: :post }) do |f|
|
||||||
|
|
||||||
= render 'devise/shared/error_messages', resource: resource
|
|
||||||
|
|
||||||
:ruby
|
:ruby
|
||||||
value = if resource.pending_reconfirmation?
|
value = if resource.pending_reconfirmation?
|
||||||
resource.unconfirmed_email
|
resource.unconfirmed_email
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
= content_for :body do
|
= content_for :body do
|
||||||
- 'black-bg'
|
- 'black-bg'
|
||||||
|
|
||||||
|
= render 'devise/shared/error_messages', resource: resource
|
||||||
|
|
||||||
.row.align-items-center.justify-content-center.full-height
|
.row.align-items-center.justify-content-center.full-height
|
||||||
.col-md-5.align-self-center
|
.col-md-5.align-self-center
|
||||||
%h2= t 'devise.invitations.edit.header'
|
%h2= t 'devise.invitations.edit.header'
|
||||||
|
@ -8,7 +10,6 @@
|
||||||
as: resource_name,
|
as: resource_name,
|
||||||
url: invitation_path(resource_name),
|
url: invitation_path(resource_name),
|
||||||
html: { method: :put }) do |f|
|
html: { method: :put }) do |f|
|
||||||
= render 'devise/shared/error_messages', resource: resource
|
|
||||||
= f.hidden_field :invitation_token, readonly: true
|
= f.hidden_field :invitation_token, readonly: true
|
||||||
- if f.object.class.require_password_on_accepting
|
- if f.object.class.require_password_on_accepting
|
||||||
.form-group
|
.form-group
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
= content_for :body do
|
= content_for :body do
|
||||||
- 'black-bg'
|
- 'black-bg'
|
||||||
|
|
||||||
|
= render 'devise/shared/error_messages', resource: resource
|
||||||
|
|
||||||
.row.align-items-center.justify-content-center.full-height
|
.row.align-items-center.justify-content-center.full-height
|
||||||
.col-md-5.align-self-center
|
.col-md-5.align-self-center
|
||||||
%h2= t 'devise.invitations.new.header'
|
%h2= t 'devise.invitations.new.header'
|
||||||
|
@ -8,7 +10,6 @@
|
||||||
as: resource_name,
|
as: resource_name,
|
||||||
url: invitation_path(resource_name),
|
url: invitation_path(resource_name),
|
||||||
html: { method: :post }) do |f|
|
html: { method: :post }) do |f|
|
||||||
= render 'devise/shared/error_messages', resource: resource
|
|
||||||
- resource.class.invite_key_fields.each do |field|
|
- resource.class.invite_key_fields.each do |field|
|
||||||
.form-group
|
.form-group
|
||||||
= f.label field
|
= f.label field
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
= content_for :body do
|
= content_for :body do
|
||||||
- 'black-bg'
|
- 'black-bg'
|
||||||
|
|
||||||
|
= render 'devise/shared/error_messages', resource: resource
|
||||||
|
|
||||||
.row.align-items-center.justify-content-center.full-height
|
.row.align-items-center.justify-content-center.full-height
|
||||||
.col-md-5.align-self-center
|
.col-md-5.align-self-center
|
||||||
.sr-only
|
.sr-only
|
||||||
|
@ -10,7 +12,6 @@
|
||||||
= form_for(resource, as: resource_name,
|
= form_for(resource, as: resource_name,
|
||||||
url: password_path(resource_name),
|
url: password_path(resource_name),
|
||||||
html: { method: :put }) do |f|
|
html: { method: :put }) do |f|
|
||||||
= render 'devise/shared/error_messages', resource: resource
|
|
||||||
|
|
||||||
= f.hidden_field :reset_password_token
|
= f.hidden_field :reset_password_token
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
= content_for :body do
|
= content_for :body do
|
||||||
- 'black-bg'
|
- 'black-bg'
|
||||||
|
|
||||||
|
= render 'devise/shared/error_messages', resource: resource
|
||||||
|
|
||||||
.row.align-items-center.justify-content-center.full-height
|
.row.align-items-center.justify-content-center.full-height
|
||||||
.col-md-5.align-self-center
|
.col-md-5.align-self-center
|
||||||
.sr-only
|
.sr-only
|
||||||
|
@ -11,7 +13,6 @@
|
||||||
as: resource_name,
|
as: resource_name,
|
||||||
url: password_path(resource_name),
|
url: password_path(resource_name),
|
||||||
html: { method: :post }) do |f|
|
html: { method: :post }) do |f|
|
||||||
= render 'devise/shared/error_messages', resource: resource
|
|
||||||
.form-group
|
.form-group
|
||||||
= f.label :email, class: 'sr-only'
|
= f.label :email, class: 'sr-only'
|
||||||
= f.email_field :email, autofocus: true, autocomplete: 'email',
|
= f.email_field :email, autofocus: true, autocomplete: 'email',
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
= content_for :body do
|
= content_for :body do
|
||||||
- 'black-bg'
|
- 'black-bg'
|
||||||
|
|
||||||
|
= render 'devise/shared/error_messages', resource: resource
|
||||||
|
|
||||||
.row.align-items-center.justify-content-center.full-height
|
.row.align-items-center.justify-content-center.full-height
|
||||||
.col-md-6.align-self-center
|
.col-md-6.align-self-center
|
||||||
%h2= t('.title')
|
%h2= t('.title')
|
||||||
|
@ -11,8 +13,6 @@
|
||||||
url: registration_path(resource_name),
|
url: registration_path(resource_name),
|
||||||
html: { method: :put }) do |f|
|
html: { method: :put }) do |f|
|
||||||
|
|
||||||
= render 'devise/shared/error_messages', resource: resource
|
|
||||||
|
|
||||||
.form-group
|
.form-group
|
||||||
= f.label :email
|
= f.label :email
|
||||||
= f.email_field :email, autofocus: true, autocomplete: 'email',
|
= f.email_field :email, autofocus: true, autocomplete: 'email',
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
= content_for :body do
|
= content_for :body do
|
||||||
- 'black-bg'
|
- 'black-bg'
|
||||||
|
|
||||||
|
= render 'devise/shared/error_messages', resource: resource
|
||||||
|
|
||||||
.row.align-items-center.justify-content-center.full-height
|
.row.align-items-center.justify-content-center.full-height
|
||||||
.col-md-5.align-self-center
|
.col-md-5.align-self-center
|
||||||
%h2= t('.sign_up')
|
%h2= t('.sign_up')
|
||||||
|
@ -10,8 +12,6 @@
|
||||||
as: resource_name,
|
as: resource_name,
|
||||||
url: registration_path(resource_name, params: { locale: params[:locale] })) do |f|
|
url: registration_path(resource_name, params: { locale: params[:locale] })) do |f|
|
||||||
|
|
||||||
= render 'devise/shared/error_messages', resource: resource
|
|
||||||
|
|
||||||
.form-group
|
.form-group
|
||||||
= f.label :email, class: 'sr-only'
|
= f.label :email, class: 'sr-only'
|
||||||
= f.email_field :email, autofocus: true, autocomplete: 'email',
|
= f.email_field :email, autofocus: true, autocomplete: 'email',
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
- if resource.errors.any?
|
- if resource.errors.any?
|
||||||
#error_explanation
|
= render 'bootstrap/alert' do
|
||||||
%h2
|
%h4.alert-heading
|
||||||
= I18n.t("errors.messages.not_saved", |
|
= I18n.t("errors.messages.not_saved", |
|
||||||
count: resource.errors.count, |
|
count: resource.errors.count, |
|
||||||
resource: resource.class.model_name.human.downcase) |
|
resource: resource.class.model_name.human.downcase) |
|
||||||
%ul
|
|
||||||
- resource.errors.full_messages.each do |message|
|
- resource.errors.full_messages.each do |message|
|
||||||
%li= message
|
%p= message
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
= content_for :body do
|
= content_for :body do
|
||||||
- 'black-bg'
|
- 'black-bg'
|
||||||
|
|
||||||
|
= render 'devise/shared/error_messages', resource: resource
|
||||||
|
|
||||||
.row.align-items-center.justify-content-center.full-height
|
.row.align-items-center.justify-content-center.full-height
|
||||||
.col-md-5.align-self-center
|
.col-md-5.align-self-center
|
||||||
.sr-only
|
.sr-only
|
||||||
|
@ -11,7 +13,6 @@
|
||||||
as: resource_name,
|
as: resource_name,
|
||||||
url: unlock_path(resource_name),
|
url: unlock_path(resource_name),
|
||||||
html: { method: :post }) do |f|
|
html: { method: :post }) do |f|
|
||||||
= render 'devise/shared/error_messages', resource: resource
|
|
||||||
.form-group
|
.form-group
|
||||||
= f.label :email, class: 'sr-only'
|
= f.label :email, class: 'sr-only'
|
||||||
= f.email_field :email, autofocus: true, autocomplete: 'email',
|
= f.email_field :email, autofocus: true, autocomplete: 'email',
|
||||||
|
|
Loading…
Reference in a new issue