mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 19:33:11 +00:00
Merge branch 'bug-massive-boostrap-form' into 'dev'
Fix massive fields sending incorrect data in POST request See merge request federez/re2o!472
This commit is contained in:
commit
8624105378
1 changed files with 8 additions and 0 deletions
|
@ -520,6 +520,14 @@ class MBFField:
|
||||||
"}} );"
|
"}} );"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Make sure the visible element doesn't have the same name as the hidden elements
|
||||||
|
# Otherwise, in the POST request, they collide and an incoherent value is sent
|
||||||
|
self.js_script += (
|
||||||
|
'$( "#{input_id}" ).ready( function() {{'
|
||||||
|
' $( "#{input_id}" ).attr("name", "mbf_{f_name}");'
|
||||||
|
"}} );"
|
||||||
|
)
|
||||||
|
|
||||||
def fill_js(self):
|
def fill_js(self):
|
||||||
""" Fill the template with the correct values """
|
""" Fill the template with the correct values """
|
||||||
self.js_script = self.js_script.format(
|
self.js_script = self.js_script.format(
|
||||||
|
|
Loading…
Reference in a new issue