diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_local_controller_js.js b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_local_controller_js.js index c2d6918f85b6d9afc52b178ba47208d2bed1807f..384b2fcb0591c7787ae8bb0cea834e4a2cfbb65d 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_local_controller_js.js +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_local_controller_js.js @@ -104,7 +104,9 @@ form_definition: form_definition, form_type: form_definition.form_type, view: options.view || app_view, - view_action_dict: view_action_dict + view_action_dict: view_action_dict, + notify_type: options.notify_type, + notify_msg: options.notify_msg }); }, function (error) { // jio not found error @@ -144,6 +146,14 @@ return gadget.updatePanel({ view_action_dict: gadget.state.view_action_dict }); + }) + .push(function () { + if (gadget.state.notify_msg && gadget.state.notify_type) { + return gadget.notifySubmitted({ + message: gadget.state.notify_msg, + status: gadget.state.notify_type + }); + } }); }) diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_local_controller_js.xml b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_local_controller_js.xml index 1dd8943a9cf2487fd5da13d34ba2502e10ed4092..8f79e376e39ad576cddafe3af9d55899b8d6b308 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_local_controller_js.xml +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_local_controller_js.xml @@ -236,7 +236,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>1015.46091.52896.5922</string> </value> + <value> <string>1018.11989.25920.31300</string> </value> </item> <item> <key> <string>state</string> </key> @@ -256,7 +256,7 @@ </tuple> <state> <tuple> - <float>1712343165.23</float> + <float>1721922124.11</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_form_view_js.js b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_form_view_js.js index e6a115766eb0187ae2eb1d623dfef1ea4537fcc7..ab454b77e6a4d30e8ab0f3ad087b0146a47733d2 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_form_view_js.js +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_form_view_js.js @@ -254,10 +254,18 @@ .declareMethod("triggerSubmit", function (argument_list) { var gadget = this, child_gadget, content_dict; if (gadget.state.form_definition.portal_type_dict.custom_submit) { - return gadget.declareGadget(gadget.state.form_definition - .portal_type_dict.custom_submit) + return gadget.getDeclaredGadget('erp5_pt_gadget') + .push(function (result) { + child_gadget = result; + return child_gadget.getContent(); + }) + .push(function (result) { + content_dict = result; + return gadget.declareGadget(gadget.state.form_definition + .portal_type_dict.custom_submit) + }) .push(function (submit_gadget) { - return submit_gadget.handle_submit(argument_list, gadget.state); + return submit_gadget.handle_submit(argument_list, gadget.state, content_dict); }); } return gadget.getDeclaredGadget('erp5_pt_gadget') @@ -434,16 +442,16 @@ } } } - return gadget.declareGadget(portal_type_dict.custom_header); + if (portal_type_dict.custom_header) { + return gadget.declareGadget(portal_type_dict.custom_header); + } + return; }) .push(function (header_gadget) { - return header_gadget.getOptions(portal_type_dict, options, header_dict); - }, function (error) { - if (!portal_type_dict.custom_header) { - return header_dict; - } else { - throw error; + if (header_gadget) { + return header_gadget.getOptions(portal_type_dict, options, header_dict); } + return header_dict; }) .push(function (header_options) { return gadget.updateHeader(header_options); diff --git a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_form_view_js.xml b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_form_view_js.xml index 6374926051bd5b0a5ecdd002df910869653a99fd..a9e9cf2aa964c693d0df93eb43579e49c1353bfe 100644 --- a/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_form_view_js.xml +++ b/bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_form_view_js.xml @@ -258,7 +258,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>1016.46538.50454.1467</string> </value> + <value> <string>1019.37331.10633.54664</string> </value> </item> <item> <key> <string>state</string> </key> @@ -278,7 +278,7 @@ </tuple> <state> <tuple> - <float>1716222503.85</float> + <float>1727373462.24</float> <string>UTC</string> </tuple> </state>