mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 08:06:23 +00:00
fix: ocultar el modal al guardar #16714
This commit is contained in:
parent
fb691b0e81
commit
ef05f10b70
3 changed files with 4 additions and 3 deletions
|
@ -50,7 +50,8 @@
|
|||
= render 'errors', post: post
|
||||
|
||||
-# Parámetros para HTMX
|
||||
%input{ type: 'hidden', name: 'hide', value: pluck_param((post.errors.empty? ? :show : :hide), optional: true) }
|
||||
%input{ type: 'hidden', name: 'modal_id', value: pluck_param(:modal_id, optional: true) }
|
||||
%input{ type: 'hidden', name: 'hide', value: pluck_param((post.errors.empty? ? :show : :hide), optional: true) || pluck_param(:modal_id, optional: true) }
|
||||
%input{ type: 'hidden', name: 'show', value: pluck_param((post.errors.empty? ? :hide : :show), optional: true) }
|
||||
%input{ type: 'hidden', name: 'name', value: pluck_param(:name) }
|
||||
%input{ type: 'hidden', name: 'base', value: pluck_param(:base) }
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
= render 'bootstrap/modal', id: id, modal_content_attributes: { class: 'h-100' } do
|
||||
- content_for :"#{id}_body" do
|
||||
-# @todo ocultar el modal después de guardar
|
||||
.placeholder-glow{ 'hx-get': site_posts_form_path(site, layout: layout, base: id, name: name, form: form_id, swap: 'innerHTML', target: target_id, attribute: 'new_has_one', hide: modal_id, uuid: metadata.value, invalid: invalid_id, submitting: submitting_id, saved: saved_id, inverse: metadata.inverse, metadata.inverse => post.uuid.value), 'hx-trigger': 'load' }
|
||||
.placeholder-glow{ 'hx-get': site_posts_form_path(site, layout: layout, base: id, name: name, form: form_id, swap: 'innerHTML', target: target_id, attribute: 'new_has_one', modal_id: modal_id, uuid: metadata.value, invalid: invalid_id, submitting: submitting_id, saved: saved_id, inverse: metadata.inverse, metadata.inverse => post.uuid.value), 'hx-trigger': 'load' }
|
||||
%span.placeholder.w-100.h-100
|
||||
|
||||
- content_for :"#{id}_footer" do
|
||||
|
|
|
@ -1 +1 @@
|
|||
= render 'posts/new_has_one', post: @post.to_index, name: pluck_param(:name), value: @uuid, modal_id: pluck_param(:show)
|
||||
= render 'posts/new_has_one', post: @post.to_index, name: pluck_param(:name), value: @uuid, modal_id: pluck_param(:modal_id)
|
||||
|
|
Loading…
Reference in a new issue