Commit 3b875012 authored by Romain Courteaud's avatar Romain Courteaud Committed by Sebastien Robin

Propagate field's local parameters

parent 8d22e5e8
...@@ -145,9 +145,8 @@ ...@@ -145,9 +145,8 @@
delete options.erp5_document;\n delete options.erp5_document;\n
delete options.form_definition;\n delete options.form_definition;\n
\n \n
\n // options = options.form_gadget || {};\n
options = options.form_gadget || {};\n form_gadget.state_parameter_dict = options.form_gadget || {};\n
form_gadget.state_parameter_dict = options;\n
\n \n
form_gadget.props.gadget_list = [];\n form_gadget.props.gadget_list = [];\n
form_gadget.props.id = erp5_document._id;\n form_gadget.props.id = erp5_document._id;\n
......
...@@ -108,10 +108,16 @@ ...@@ -108,10 +108,16 @@
// declared methods\n // declared methods\n
/////////////////////////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////\n
.declareMethod(\'render\', function (options) {\n .declareMethod(\'render\', function (options) {\n
\n
var form_options = options.erp5_form || {};\n
\n
form_options.erp5_document = options.erp5_document;\n
form_options.form_definition = options.form_definition;\n
form_options.view = options.view;\n
\n \n
return this.getDeclaredGadget("erp5_form")\n return this.getDeclaredGadget("erp5_form")\n
.push(function (erp5_form) {\n .push(function (erp5_form) {\n
return erp5_form.render(options);\n return erp5_form.render(form_options);\n
});\n });\n
\n \n
});\n });\n
......
...@@ -145,9 +145,19 @@ ...@@ -145,9 +145,19 @@
]);\n ]);\n
})\n })\n
.push(function (all_gadget) {\n .push(function (all_gadget) {\n
var form_options = options.erp5_form || {},\n
tab_options = options.erp5_tag || {};\n
\n
form_options.erp5_document = options.erp5_document;\n
form_options.form_definition = options.form_definition;\n
form_options.view = options.view;\n
tab_options.erp5_document = options.erp5_document;\n
tab_options.form_definition = options.form_definition;\n
tab_options.view = options.view;\n
\n
return RSVP.all([\n return RSVP.all([\n
all_gadget[1].render(options),\n all_gadget[1].render(form_options),\n
all_gadget[0].render(options),\n all_gadget[0].render(tab_options),\n
]);\n ]);\n
});\n });\n
\n \n
......
14 15
\ No newline at end of file \ No newline at end of file
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