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
ece9541c
Commit
ece9541c
authored
Dec 10, 2015
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PasswordTool: Use of site URL as a parameter and dynamic title
parent
428b6aa9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
product/ERP5/Tool/PasswordTool.py
product/ERP5/Tool/PasswordTool.py
+8
-6
No files found.
product/ERP5/Tool/PasswordTool.py
View file @
ece9541c
...
...
@@ -99,7 +99,7 @@ class PasswordTool(BaseTool):
parameter
=
urlencode
(
dict
(
reset_key
=
key
))
method
=
self
.
_getTypeBasedMethod
(
"getSiteUrl"
)
if
method
is
not
None
:
base_url
=
method
()
base_url
=
method
(
site_url
)
else
:
base_url
=
"%s/portal_password/PasswordTool_viewResetPassword"
%
(
site_url
,)
...
...
@@ -115,7 +115,8 @@ class PasswordTool(BaseTool):
notification_message
=
None
,
sender
=
None
,
store_as_event
=
False
,
expiration_date
=
None
,
substitution_method_parameter_dict
=
None
):
substitution_method_parameter_dict
=
None
,
site_url
=
None
):
"""
Create a random string and expiration date for request
Parameters:
...
...
@@ -137,6 +138,7 @@ class PasswordTool(BaseTool):
if
user_login
is
None
:
user_login
=
REQUEST
[
"user_login"
]
if
not
site_url
:
site_url
=
self
.
getPortalObject
().
absolute_url
()
if
REQUEST
and
'came_from'
in
REQUEST
:
site_url
=
REQUEST
.
came_from
...
...
@@ -191,7 +193,7 @@ class PasswordTool(BaseTool):
message_text_format
=
'text/plain'
else
:
message_text_format
=
notification_message
.
getContentType
()
subject
=
notification_message
.
getTitle
(
)
subject
=
notification_message
.
asSubjectText
(
substitution_method_parameter_dict
=
message_dict
)
if
message_text_format
==
"text/html"
:
message
=
notification_message
.
asEntireHTML
(
substitution_method_parameter_dict
=
message_dict
)
else
:
...
...
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