5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-28 16:36:21 +00:00

fix: ocultar el modal al guardar

This commit is contained in:
f 2024-10-21 16:32:51 -03:00
parent 48085be162
commit 379f4ab31f
No known key found for this signature in database
2 changed files with 3 additions and 0 deletions

View file

@ -91,6 +91,7 @@
para que sea externo al formulario actual.
- content_for :post_form do
%form{ id: post_form_id, 'hx-get': site_posts_form_path(site), 'hx-target': "##{post_form_loaded_id}" }
%input{ type: 'hidden', name: 'modal_id', value: modal_id }
%input{ type: 'hidden', name: 'show', value: post_modal_id }
%input{ type: 'hidden', name: 'hide', value: modal_id }
%input{ type: 'hidden', name: 'target', value: value_list_id }

View file

@ -50,6 +50,8 @@
= hidden_field_tag 'result_id', result_id
= hidden_field_tag 'modal_id', modal_id
= hidden_field_tag "#{base}[layout]", post.layout.name
= hidden_field_tag 'hide', pluck_param((post.errors.empty? ? :show : :hide), optional: true) || pluck_param(:modal_id, optional: true)
= hidden_field_tag 'show', pluck_param((post.errors.empty? ? :hide : :show), optional: true)
- if inverse
= hidden_field_tag 'inverse', inverse