5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 18:46:23 +00:00

fix: usar un nombre unico para el formulario en el modal

This commit is contained in:
f 2024-05-27 15:12:03 -03:00
parent d347e177e4
commit f0769427b7
No known key found for this signature in database
2 changed files with 3 additions and 2 deletions

View file

@ -13,7 +13,7 @@
end
options = {
id: base,
id: params.require(:form),
multipart: true,
class: 'form post ',
'hx-swap': params.require(:swap),

View file

@ -86,6 +86,7 @@
%input{ type: 'hidden', name: 'swap', value: 'beforeend' }
%input{ type: 'hidden', name: 'base', value: id }
%input{ type: 'hidden', name: 'name', value: name }
%input{ type: 'hidden', name: 'form', value: form_id }
- if metadata.inverse?
%input{ type: 'hidden', name: 'inverse', value: metadata.inverse }
%div{ id: post_modal_id, data: { controller: 'modal' } }
@ -93,4 +94,4 @@
- content_for :"#{post_id}_body" do
%div{ id: post_form_loaded_id }
- content_for :"#{post_id}_footer" do
= render 'bootstrap/btn', form: id, content: t('.save'), type: 'submit'
= render 'bootstrap/btn', form: form_id, content: t('.save'), type: 'submit'