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:
parent
d347e177e4
commit
f0769427b7
2 changed files with 3 additions and 2 deletions
|
@ -13,7 +13,7 @@
|
|||
end
|
||||
|
||||
options = {
|
||||
id: base,
|
||||
id: params.require(:form),
|
||||
multipart: true,
|
||||
class: 'form post ',
|
||||
'hx-swap': params.require(:swap),
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue