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
141
Merge Requests
141
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
114cd08a
Commit
114cd08a
authored
Apr 16, 2024
by
Carlos Ramos Carreño
Committed by
Jérome Perrin
May 09, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Review/fix diff and passed all tests locally.
parent
e3072d65
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
bt5/erp5_officejs/SkinTemplateItem/portal_skins/erp5_web_officejs_ui/WebSection_getBase64ConfigurationUrlList.py
...b_officejs_ui/WebSection_getBase64ConfigurationUrlList.py
+5
-4
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/Post_ingestWebMessageForSupportRequest.py
...support_request/Post_ingestWebMessageForSupportRequest.py
+2
-1
No files found.
bt5/erp5_officejs/SkinTemplateItem/portal_skins/erp5_web_officejs_ui/WebSection_getBase64ConfigurationUrlList.py
View file @
114cd08a
import
json
import
json
import
base64
import
base64
from
erp5.component.module.Log
import
log
from
erp5.component.module.Log
import
log
from
Products.ERP5Type.Utils
import
bytes2str
,
str2bytes
def
getElementFromContent
(
key
,
content
):
def
getElementFromContent
(
key
,
content
):
before_template
=
'"%s" type="text/x-renderjs-configuration">'
before_template
=
'"%s" type="text/x-renderjs-configuration">'
...
@@ -69,22 +70,22 @@ try:
...
@@ -69,22 +70,22 @@ try:
configuration_path_list
=
[]
configuration_path_list
=
[]
for
key
in
portal_actions_dict
:
for
key
in
portal_actions_dict
:
path
=
"portal_types/%s"
%
key
path
=
"portal_types/%s"
%
key
configuration_path_list
.
append
(
b
ase64
.
b64encode
(
path
.
encode
()).
decode
(
))
configuration_path_list
.
append
(
b
ytes2str
(
base64
.
b64encode
(
str2bytes
(
path
))
))
for
action
in
portal_actions_dict
[
key
]:
for
action
in
portal_actions_dict
[
key
]:
path
=
"portal_types/%s/%s"
%
(
key
,
action
)
path
=
"portal_types/%s/%s"
%
(
key
,
action
)
configuration_path_list
.
append
(
b
ase64
.
b64encode
(
path
.
encode
()).
decode
(
))
configuration_path_list
.
append
(
b
ytes2str
(
base64
.
b64encode
(
str2bytes
(
path
))
))
try
:
try
:
action_object
=
context
.
restrictedTraverse
(
path
)
action_object
=
context
.
restrictedTraverse
(
path
)
form
=
action_object
.
getActionText
().
split
(
'/'
)[
-
1
]
form
=
action_object
.
getActionText
().
split
(
'/'
)[
-
1
]
path
=
"portal_skins/%s/%s"
%
(
portal_skin
,
form
)
path
=
"portal_skins/%s/%s"
%
(
portal_skin
,
form
)
configuration_path_list
.
append
(
b
ase64
.
b64encode
(
path
.
encode
()).
decode
(
))
configuration_path_list
.
append
(
b
ytes2str
(
base64
.
b64encode
(
str2bytes
(
path
))
))
except
KeyError
as
e
:
except
KeyError
as
e
:
raise
KeyError
(
"Error getting portal action info: "
+
str
(
e
))
raise
KeyError
(
"Error getting portal action info: "
+
str
(
e
))
if
new_dialog_form_list
:
if
new_dialog_form_list
:
for
form
in
new_dialog_form_list
:
for
form
in
new_dialog_form_list
:
path
=
"portal_skins/%s/%s"
%
(
portal_skin
,
form
)
path
=
"portal_skins/%s/%s"
%
(
portal_skin
,
form
)
configuration_path_list
.
append
(
b
ase64
.
b64encode
(
path
.
encode
()).
decode
(
))
configuration_path_list
.
append
(
b
ytes2str
(
base64
.
b64encode
(
str2bytes
(
path
))
))
url_list
=
[]
url_list
=
[]
for
path
in
configuration_path_list
:
for
path
in
configuration_path_list
:
...
...
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/Post_ingestWebMessageForSupportRequest.py
View file @
114cd08a
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Type.Utils
import
bytes2str
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
support_request
=
context
.
getFollowUpValue
()
support_request
=
context
.
getFollowUpValue
()
web_site_value
=
portal
.
restrictedTraverse
(
web_site_relative_url
)
web_site_value
=
portal
.
restrictedTraverse
(
web_site_relative_url
)
...
@@ -34,7 +35,7 @@ web_message = portal.event_module.newContent(
...
@@ -34,7 +35,7 @@ web_message = portal.event_module.newContent(
portal_type
=
'Web Message'
,
portal_type
=
'Web Message'
,
title
=
context
.
getTitle
()
if
context
.
hasTitle
()
else
None
,
title
=
context
.
getTitle
()
if
context
.
hasTitle
()
else
None
,
content_type
=
'text/html'
if
is_html
else
'text/plain'
,
content_type
=
'text/html'
if
is_html
else
'text/plain'
,
text_content
=
data
.
decode
(
'utf-8'
),
text_content
=
bytes2str
(
data
),
follow_up_value
=
support_request
,
follow_up_value
=
support_request
,
aggregate_value_list
=
[
context
]
+
context
.
getSuccessorValueList
(
aggregate_value_list
=
[
context
]
+
context
.
getSuccessorValueList
(
portal_type
=
portal
.
getPortalDocumentTypeList
()),
portal_type
=
portal
.
getPortalDocumentTypeList
()),
...
...
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