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
Titouan Soulard
erp5
Commits
02e06ea3
Commit
02e06ea3
authored
May 17, 2018
by
Tomáš Peterka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_core] Reinforce comment FormBox re-validation
parent
b511f0c6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
8 deletions
+16
-8
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_modifyDocumentListStatus.py
...portal_skins/erp5_core/Folder_modifyDocumentListStatus.py
+9
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_modifyDocumentListStatusDialog.xml
...skins/erp5_core/Folder_modifyDocumentListStatusDialog.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_modifyDocumentListStatusDialog/workflow_dialog_my_workflow_action.xml
...ntListStatusDialog/workflow_dialog_my_workflow_action.xml
+3
-3
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_modifyDocumentListStatusDialog/workflow_dialog_your_workflow_action.xml
...ListStatusDialog/workflow_dialog_your_workflow_action.xml
+3
-3
No files found.
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_modifyDocumentListStatus.py
View file @
02e06ea3
...
...
@@ -8,6 +8,7 @@ This script is intended as a dialog target.
:param comment: {str} optional comment
"""
from
Products.CMFCore.WorkflowCore
import
WorkflowException
from
Products.Formulator.Errors
import
FormValidationError
,
ValidationError
def
stripMyYour
(
key
):
if
key
.
startswith
(
"your_"
)
or
key
.
startswith
(
"my_"
):
...
...
@@ -73,10 +74,17 @@ tag = 'folder_workflow_action_{:d}'.format(random.randint(0, 1000)) # Kato: how
priority
=
3
batch_size
=
100
workflow_action_kwargs
=
{}
if
workflow_dialog
is
None
:
workflow_dialog_id
=
context
.
Base_getFormIdForWorkflowAction
(
form_id
,
''
,
workflow_action
,
uids
=
uids
)
workflow_dialog
=
getattr
(
context
,
workflow_dialog_id
)
workflow_action_kwargs
=
workflow_dialog
.
validate_all
(
request
,
key_prefix
=
'field_workflow_dialog'
)
try
:
workflow_action_kwargs
=
workflow_dialog
.
validate_all
(
request
,
key_prefix
=
'field_workflow_dialog'
)
except
FormValidationError
,
ValidationError
:
workflow_action_kwargs
[
"comment"
]
=
(
comment
or
kwargs
.
get
(
"field_workflow_dialog_your_comment"
,
""
)
or
kwargs
.
get
(
"field_workflow_dialog_my_comment"
,
""
)
or
kwargs
.
get
(
"field_workflow_dialog_comment"
,
""
))
workflow_action_kwargs
=
{
stripMyYour
(
key
):
value
for
key
,
value
in
workflow_action_kwargs
.
items
()}
workflow_action_kwargs
[
'workflow_action'
]
=
workflow_action
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_modifyDocumentListStatusDialog.xml
View file @
02e06ea3
...
...
@@ -75,10 +75,10 @@
<value>
<list>
<string>
workflow_action
</string>
<string>
workflow_dialog
</string>
<string>
workflow_dialog_my_workflow_action
</string>
<string>
workflow_dialog_your_workflow_action
</string>
<string>
workflow_action_rendered
</string>
<string>
workflow_dialog
</string>
</list>
</value>
</item>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_modifyDocumentListStatusDialog/workflow_dialog_my_workflow_action.xml
View file @
02e06ea3
...
...
@@ -193,7 +193,7 @@
<dictionary>
<item>
<key>
<string>
alternate_name
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
my_workflow_action
</string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
...
...
@@ -201,7 +201,7 @@
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
non-existing-dummy
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
...
...
@@ -249,7 +249,7 @@
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
workflow_dialog_my_action
</string>
</value>
<value>
<string>
workflow_dialog_my_
workflow_
action
</string>
</value>
</item>
<item>
<key>
<string>
truncate
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_modifyDocumentListStatusDialog/workflow_dialog_your_workflow_action.xml
View file @
02e06ea3
...
...
@@ -193,7 +193,7 @@
<dictionary>
<item>
<key>
<string>
alternate_name
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
your_workflow_action
</string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
...
...
@@ -201,7 +201,7 @@
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
non-existing-dummy
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
...
...
@@ -249,7 +249,7 @@
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
workflow_dialog_
my
_workflow_action
</string>
</value>
<value>
<string>
workflow_dialog_
your
_workflow_action
</string>
</value>
</item>
<item>
<key>
<string>
truncate
</string>
</key>
...
...
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