Commit 86241053 authored by chirac's avatar chirac

Merge branch 'bug-massive-boostrap-form' into 'dev'

Fix massive fields sending incorrect data in POST request

See merge request federez/re2o!472
parents af05df6c 755e95e6
Pipeline #2315 passed with stage
in 3 minutes and 10 seconds
......@@ -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):
""" Fill the template with the correct values """
self.js_script = self.js_script.format(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment