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
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
73e0e6e2
Commit
73e0e6e2
authored
Feb 08, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
web_renderjs_ui: py3
parent
60bfa498
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
10 deletions
+15
-10
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/Base_extractReferredObjectDictFromHtml.py
..._skins/erp5_web/Base_extractReferredObjectDictFromHtml.py
+1
-1
bt5/erp5_web_renderjs_ui/ExtensionTemplateItem/portal_components/extension.erp5.WebRenderJSUI.py
...ateItem/portal_components/extension.erp5.WebRenderJSUI.py
+1
-1
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebSection_renderDefaultPageAsGadget.py
...5_web_renderjs_ui/WebSection_renderDefaultPageAsGadget.py
+7
-1
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/login_once_form.zpt
...tem/portal_skins/erp5_web_renderjs_ui/login_once_form.zpt
+1
-1
bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/MailHost_redirectPageToURLFromLastMessage.py
...erjs_ui_test/MailHost_redirectPageToURLFromLastMessage.py
+5
-6
No files found.
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/Base_extractReferredObjectDictFromHtml.py
View file @
73e0e6e2
...
...
@@ -24,7 +24,7 @@ if not isinstance(deny_tag_list, (list, tuple)):
deny_tag_list
=
[]
def
main
(
data
):
if
isinstance
(
data
,
str
):
if
isinstance
(
data
,
bytes
):
data
=
data
.
decode
(
"utf-8"
)
for
part
in
context
.
Base_parseHtml
(
data
):
handleHtmlPart
(
part
)
...
...
bt5/erp5_web_renderjs_ui/ExtensionTemplateItem/portal_components/extension.erp5.WebRenderJSUI.py
View file @
73e0e6e2
...
...
@@ -12,7 +12,7 @@ def ERP5Site_extractTranslationMessageListFromHTML(self, text_content):
"""
if
not
text_content
:
return
if
isinstance
(
text_content
,
str
):
if
isinstance
(
text_content
,
bytes
):
text_content
=
text_content
.
decode
(
'utf-8'
)
parser
=
lxml
.
etree
.
HTMLParser
()
...
...
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebSection_renderDefaultPageAsGadget.py
View file @
73e0e6e2
import
json
import
re
from
six.moves.urllib.parse
import
urljoin
from
Products.ERP5Type.Utils
import
bytes2str
,
str2bytes
if
REQUEST
is
None
:
REQUEST
=
context
.
REQUEST
...
...
@@ -40,6 +40,12 @@ if selected_language == default_language:
else
:
base_prefix
=
'../'
def
urljoin
(
base
,
url
):
# concemtually similar to urllib.parse.urljoin, but without trying to eliminate
# .. path elements, because we want to produce relative URLs that may be parent
# of the base.
return
base_prefix
+
url
mapping_dict
=
{
"base_prefix"
:
base_prefix
,
"frontpage_gadget"
:
web_section
.
getLayoutProperty
(
"configuration_frontpage_gadget_url"
,
default
=
"worklist"
),
...
...
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/login_once_form.zpt
View file @
73e0e6e2
...
...
@@ -74,7 +74,7 @@
</div>
<div
class=
"dialog_button_container"
>
<input
type=
"submit"
value=
"Login"
i18n:attributes=
"value"
i18n:domain=
"ui"
tal:attributes=
"name python: '%s:method' % (form_action, )"
/>
<a
i18n:domain=
"ui"
i18n:translate=
""
tal:attributes=
"href python: '%sWebSite_viewRecoverAccount?%s' % (absolute_url, modules['
urllib
'].urlencode([('came_from', absolute_url)]))"
>
I forgot my password!
</a>
<a
i18n:domain=
"ui"
i18n:translate=
""
tal:attributes=
"href python: '%sWebSite_viewRecoverAccount?%s' % (absolute_url, modules['
six.moves.urllib.parse
'].urlencode([('came_from', absolute_url)]))"
>
I forgot my password!
</a>
</div>
<div
class=
"dialog_button_container"
tal:condition=
"enable_google_login"
>
<a
tal:attributes=
"href python: root_absolute_url + 'ERP5Site_redirectToGoogleLoginPage'"
...
...
bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/MailHost_redirectPageToURLFromLastMessage.py
View file @
73e0e6e2
last_message
=
context
.
getLastLog
()[
-
1
]
line_list
=
filter
(
None
,
last_message
.
replace
(
"=
\
n
"
,
""
).
split
(
"
\
n
"
))
for
line
in
line_list
:
if
"http"
in
line
:
return
context
.
REQUEST
.
RESPONSE
.
redirect
(
line
.
replace
(
"=3D"
,
"="
))
import
re
from
Products.ERP5Type.Utils
import
bytes2str
last_message_text
=
bytes2str
(
context
.
getMessageList
()[
-
1
][
2
])
__traceback_info__
=
last_message_text
r
aise
RuntimeError
(
"URL not found in the email"
)
r
eturn
container
.
REQUEST
.
RESPONSE
.
redirect
(
re
.
findall
(
r"http.*"
,
last_message_text
)[
0
]
)
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