Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
Xavier Thompson
slapos.core
Commits
4962d490
Commit
4962d490
authored
Jan 26, 2021
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_subscription_request: change order confirmation url
parent
433987af
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscriptionProxy.py
...est/SubscriptionRequestModule_requestSubscriptionProxy.py
+2
-2
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionSkins.py
...ortal_components/test.erp5.testSlapOSSubscriptionSkins.py
+3
-2
No files found.
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscriptionProxy.py
View file @
4962d490
...
@@ -34,14 +34,14 @@ person, person_is_new = context.SubscriptionRequest_createUser(email, user_input
...
@@ -34,14 +34,14 @@ person, person_is_new = context.SubscriptionRequest_createUser(email, user_input
# Check if user is already exist, otherwise redirect to ask confirmation
# Check if user is already exist, otherwise redirect to ask confirmation
if
confirmation_required
and
not
person_is_new
:
if
confirmation_required
and
not
person_is_new
:
base_url
=
web_site
.
absolute_url
()
base_url
=
web_site
.
absolute_url
()
redirect_url
=
"%s/
#order_confirmation?name=%s&email=%s&amount=%s&subscription_reference
=%s"
%
(
redirect_url
=
"%s/
order_confirmation?field_your_reservation_name=%s&field_your_reservation_email=%s&field_your_reservation_number_of_machines=%s&field_your_reservation_network
=%s"
%
(
base_url
,
base_url
,
person
.
getTitle
(),
person
.
getTitle
(),
person
.
getDefaultEmailText
(),
person
.
getDefaultEmailText
(),
user_input_dict
[
"amount"
],
user_input_dict
[
"amount"
],
subscription_reference
)
subscription_reference
)
if
token
:
if
token
:
redirect_url
+=
"&token=%s"
%
token
redirect_url
+=
"&
field_your_reservation_invitation_
token=%s"
%
token
return
context
.
REQUEST
.
RESPONSE
.
redirect
(
redirect_url
)
return
context
.
REQUEST
.
RESPONSE
.
redirect
(
redirect_url
)
if
target_language
is
None
:
if
target_language
is
None
:
...
...
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionSkins.py
View file @
4962d490
...
@@ -353,8 +353,9 @@ class Test0SubscriptionRequestModule_requestSubscriptionProxy(TestSubscriptionSk
...
@@ -353,8 +353,9 @@ class Test0SubscriptionRequestModule_requestSubscriptionProxy(TestSubscriptionSk
email
=
email
,
subscription_reference
=
subscription_reference
,
email
=
email
,
subscription_reference
=
subscription_reference
,
confirmation_required
=
True
,
user_input_dict
=
user_input_dict
)
confirmation_required
=
True
,
user_input_dict
=
user_input_dict
)
self
.
assertTrue
(
response
.
endswith
(
"#order_confirmation?name=Member Template&email=%s&amount=1&subscription_reference=test_subscription_reference"
%
email
),
response
)
self
.
assertTrue
(
response
.
endswith
(
"order_confirmation?field_your_reservation_name=Member Template&field_your_reservation_email=%s&field_your_reservation_number_of_machines=1&field_your_reservation_network=test_subscription_reference"
%
email
),
response
)
# Missing tests XXXX
# Missing tests XXXX
class
TestSubscriptionRequest_applyCondition
(
TestSubscriptionSkinsMixin
):
class
TestSubscriptionRequest_applyCondition
(
TestSubscriptionSkinsMixin
):
...
...
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