Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin
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
Ekaterina
wendelin
Commits
e386fa1e
Commit
e386fa1e
authored
Jul 17, 2019
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show message from server side user credential request creation script.
parent
7a1f0f98
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
bt5/erp5_wendelin_data_lake_ingestion/SkinTemplateItem/portal_skins/erp5_wendelin_data_lake/ERP5Site_newCredentialRequest.py
.../erp5_wendelin_data_lake/ERP5Site_newCredentialRequest.py
+11
-1
No files found.
bt5/erp5_wendelin_data_lake_ingestion/SkinTemplateItem/portal_skins/erp5_wendelin_data_lake/ERP5Site_newCredentialRequest.py
View file @
e386fa1e
...
...
@@ -2,6 +2,8 @@
Paramameter list :
reference -- User login is mandatory (String)
default_email_text -- Email is mandatory (String)"""
import
json
# create the credential request
portal
=
context
.
getPortalObject
()
module
=
portal
.
getDefaultModule
(
portal_type
=
'Credential Request'
)
...
...
@@ -10,7 +12,11 @@ category_list = portal_preferences.getPreferredSubscriptionAssignmentCategoryLis
if
not
context
.
CredentialRequest_checkLoginAvailability
(
reference
):
message_str
=
"Selected login is already in use, please choose different one."
return
portal
.
Base_redirect
(
keep_items
=
dict
(
portal_status_message
=
context
.
Base_translateString
(
message_str
)))
if
not
batch_mode
:
return
portal
.
Base_redirect
(
keep_items
=
dict
(
portal_status_message
=
context
.
Base_translateString
(
message_str
)))
else
:
return
json
.
dumps
({
'msg'
:
message_str
,
'code'
:
1
})
credential_request
=
module
.
newContent
(
portal_type
=
"Credential Request"
,
...
...
@@ -68,6 +74,10 @@ else:
credential_request
.
submit
(
"Automatic submit"
)
message_str
=
"Credential Request Created."
message_str
=
"Registration submitted. Wait for an email."
if
not
batch_mode
:
return
portal
.
Base_redirect
(
form_id
=
'login_form'
,
keep_items
=
dict
(
portal_status_message
=
context
.
Base_translateString
(
message_str
)))
else
:
return
json
.
dumps
({
'msg'
:
message_str
,
'code'
:
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