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
Labels
Merge Requests
139
Merge Requests
139
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
becaeaf4
Commit
becaeaf4
authored
Oct 05, 2016
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Do not try to submit if the form doesn't have action
parent
b3b4f88b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
14 deletions
+21
-14
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.js
...b_page_module/rjs_gadget_erp5_pt_form_view_editable_js.js
+19
-12
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.xml
..._page_module/rjs_gadget_erp5_pt_form_view_editable_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.js
View file @
becaeaf4
...
...
@@ -29,8 +29,17 @@
editable
:
options
.
editable
,
erp5_document
:
options
.
erp5_document
,
form_definition
:
options
.
form_definition
,
erp5_form
:
options
.
erp5_form
||
{}
erp5_form
:
options
.
erp5_form
||
{},
new_content_action
:
false
,
delete_action
:
false
,
save_action
:
false
};
if
(
options
.
erp5_document
.
_embedded
.
_view
.
_actions
!==
undefined
)
{
if
(
options
.
erp5_document
.
_embedded
.
_view
.
_actions
.
put
!==
undefined
)
{
state_dict
.
save_action
=
true
;
}
}
return
this
.
changeState
(
state_dict
);
})
...
...
@@ -52,14 +61,7 @@
// render the header
.
push
(
function
()
{
var
new_content_action
=
form_gadget
.
state
.
erp5_document
.
_links
.
action_object_new_content_action
,
delete_action
=
form_gadget
.
state
.
erp5_document
.
_links
.
action_object_delete_action
,
save_action
=
false
;
if
(
form_gadget
.
state
.
erp5_document
.
_embedded
.
_view
.
_actions
!==
undefined
)
{
if
(
form_gadget
.
state
.
erp5_document
.
_embedded
.
_view
.
_actions
.
put
!==
undefined
)
{
save_action
=
true
;
}
}
delete_action
=
form_gadget
.
state
.
erp5_document
.
_links
.
action_object_delete_action
;
if
(
new_content_action
!==
undefined
)
{
new_content_action
=
form_gadget
.
getUrlFor
({
command
:
'
change
'
,
options
:
{
view
:
new_content_action
.
href
,
editable
:
true
}});
...
...
@@ -78,7 +80,6 @@
new_content_action
,
form_gadget
.
getUrlFor
({
command
:
'
history_previous
'
}),
delete_action
,
save_action
,
calculatePageTitle
(
form_gadget
,
form_gadget
.
state
.
erp5_document
)
]);
})
...
...
@@ -90,9 +91,9 @@
selection_url
:
all_result
[
3
],
delete_url
:
all_result
[
4
],
cut_url
:
""
,
page_title
:
all_result
[
6
]
page_title
:
all_result
[
5
]
};
if
(
all_result
[
5
]
===
true
)
{
if
(
form_gadget
.
state
.
save_action
===
true
)
{
header_dict
.
save_action
=
true
;
}
return
form_gadget
.
updateHeader
(
header_dict
);
...
...
@@ -100,6 +101,12 @@
})
.
onEvent
(
'
submit
'
,
function
()
{
if
(
this
.
state
.
save_action
!==
true
)
{
// If not action is defined on form, do nothing
return
;
}
var
form_gadget
=
this
,
erp5_form
,
form_id
=
this
.
state
.
erp5_document
.
_embedded
.
_view
.
form_id
,
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.xml
View file @
becaeaf4
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
954.
5679.65163.53162
</string>
</value>
<value>
<string>
954.
25820.35404.6229
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
14756
68916.27
</float>
<float>
14756
71542.46
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
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