Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alecs_myu
erp5
Commits
e80c5b63
Commit
e80c5b63
authored
Apr 24, 2015
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: add custom form action checking
parent
0d731701
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
+18
-7
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.xml
...tem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.xml
+18
-7
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.xml
View file @
e80c5b63
...
...
@@ -158,7 +158,7 @@
form_gadget.props.editable = options.editable;\n
form_gadget.props.action = erp5_document._embedded._view._actions.put;\n
form_gadget.props.form_id = erp5_document._embedded._view.form_id;\n
\n
form_gadget.props.form_action = options.form_definition.action;
\n
\n
return form_gadget.getDeclaredGadget("erp5_form")\n
\n
...
...
@@ -231,7 +231,11 @@
\n
\n
.declareService(function () {\n
var form_gadget = this;\n
var form_gadget = this,\n
is_custom_dialog = false,\n
tmp,\n
generic_dialog_id_list = ["Base_configureUI", "Base_configureSortOn", "Workflow_statusModify",\n
"Base_editRelation", "Base_createRelation", "Folder_delete"];\n
\n
function formSubmit() {\n
return form_gadget.notifySubmitting()\n
...
...
@@ -250,9 +254,16 @@
// XXX Hardcoded\n
data.dialog_id =\n
form_gadget.props.form_id[\'default\'];\n
if (generic_dialog_id_list.indexOf(form_gadget.props.form_action) === -1) {\n
is_custom_dialog = true;\n
}\n
for (key in content_dict) {\n
if (content_dict.hasOwnProperty(key)) {\n
data[key] = content_dict[key];\n
tmp = key;\n
if (is_custom_dialog
&&
(key.indexOf("field_your") === 0 || key.indexOf("field_my") === 0)) {\n
tmp = key.split("_")[2];\n
}\n
data[tmp] = content_dict[key];\n
}\n
}\n
\n
...
...
@@ -411,7 +422,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
romain
</string>
</value>
<value>
<string>
xiaowu
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -425,7 +436,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
94
0.49292.16784.61849
</string>
</value>
<value>
<string>
94
2.35941.31227.49152
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -443,8 +454,8 @@
</tuple>
<state>
<tuple>
<float>
142
3066365.58
</float>
<string>
GMT
</string>
<float>
142
9870719.03
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment