diff --git a/app/views/posts/attributes/_new_has_and_belongs_to_many.haml b/app/views/posts/attributes/_new_has_and_belongs_to_many.haml index 17603b29..6959ecf7 100644 --- a/app/views/posts/attributes/_new_has_and_belongs_to_many.haml +++ b/app/views/posts/attributes/_new_has_and_belongs_to_many.haml @@ -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 } diff --git a/app/views/posts/modal.haml b/app/views/posts/modal.haml index 2b50e41c..6875cea8 100644 --- a/app/views/posts/modal.haml +++ b/app/views/posts/modal.haml @@ -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