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
Boxiang Sun
slapos.core
Commits
a5b7c244
Commit
a5b7c244
authored
Jun 23, 2020
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_subscription_request: Allow to set target_language via command line on the request.
parent
ac2ec485
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
5 deletions
+6
-5
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscription.py
..._request/SubscriptionRequestModule_requestSubscription.py
+1
-1
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscription.xml
...request/SubscriptionRequestModule_requestSubscription.xml
+1
-1
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscriptionProxy.py
...est/SubscriptionRequestModule_requestSubscriptionProxy.py
+2
-1
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscriptionProxy.xml
...st/SubscriptionRequestModule_requestSubscriptionProxy.xml
+1
-1
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionSkins.py
...ortal_components/test.erp5.testSlapOSSubscriptionSkins.py
+1
-1
No files found.
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscription.py
View file @
a5b7c244
...
@@ -21,4 +21,4 @@ user_input_dict = {
...
@@ -21,4 +21,4 @@ user_input_dict = {
return
context
.
SubscriptionRequestModule_requestSubscriptionProxy
(
return
context
.
SubscriptionRequestModule_requestSubscriptionProxy
(
default_email_text
,
subscription_reference
,
default_email_text
,
subscription_reference
,
confirmation_required
=
bool
(
confirmation_required
),
confirmation_required
=
bool
(
confirmation_required
),
user_input_dict
=
user_input_dict
,
batch_mode
=
0
)
user_input_dict
=
user_input_dict
,
target_language
=
target_language
,
batch_mode
=
0
)
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscription.xml
View file @
a5b7c244
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
name=None, default_email_text=None, subscription_reference=None, amount=0, confirmation_required=True, REQUEST=None, **kw
</string>
</value>
<value>
<string>
name=None, default_email_text=None, subscription_reference=None, amount=0, confirmation_required=True,
target_language=None,
REQUEST=None, **kw
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscriptionProxy.py
View file @
a5b7c244
...
@@ -19,7 +19,8 @@ if confirmation_required and not person_is_new:
...
@@ -19,7 +19,8 @@ if confirmation_required and not person_is_new:
user_input_dict
[
"amount"
],
user_input_dict
[
"amount"
],
subscription_reference
))
subscription_reference
))
target_language
=
context
.
getPortalObject
().
Localizer
.
get_selected_language
()
if
target_language
is
None
:
target_language
=
context
.
getPortalObject
().
Localizer
.
get_selected_language
()
subscription_request
=
context
.
subscription_request_module
.
newContent
(
subscription_request
=
context
.
subscription_request_module
.
newContent
(
portal_type
=
"Subscription Request"
,
portal_type
=
"Subscription Request"
,
...
...
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscriptionProxy.xml
View file @
a5b7c244
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
email, subscription_reference, confirmation_required=False, user_input_dict={}, batch_mode=True, REQUEST=None
</string>
</value>
<value>
<string>
email, subscription_reference, confirmation_required=False, user_input_dict={},
target_language=None,
batch_mode=True, REQUEST=None
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<key>
<string>
_proxy_roles
</string>
</key>
...
...
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionSkins.py
View file @
a5b7c244
...
@@ -245,7 +245,7 @@ class TestSubscriptionRequestModule_requestSubscription(TestSubscriptionSkinsMix
...
@@ -245,7 +245,7 @@ class TestSubscriptionRequestModule_requestSubscription(TestSubscriptionSkinsMix
name
=
"couscous"
)
name
=
"couscous"
)
expected_argument_tuple
=
((
'123@nexedi.com'
,
'subscription_reference'
),
expected_argument_tuple
=
((
'123@nexedi.com'
,
'subscription_reference'
),
{
'confirmation_required'
:
True
,
'user_input_dict'
:
{
'name'
:
"couscous"
,
'amount'
:
0
},
'batch_mode'
:
0
})
{
'confirmation_required'
:
True
,
'user_input_dict'
:
{
'name'
:
"couscous"
,
'amount'
:
0
},
'
target_language'
:
None
,
'
batch_mode'
:
0
})
self
.
assertEqual
(
expected_argument_tuple
,
module
.
SubscriptionRequestModule_requestSubscription
(
self
.
assertEqual
(
expected_argument_tuple
,
module
.
SubscriptionRequestModule_requestSubscription
(
REQUEST
=
self
.
portal
.
REQUEST
,
default_email_text
=
"123@nexedi.com"
,
REQUEST
=
self
.
portal
.
REQUEST
,
default_email_text
=
"123@nexedi.com"
,
...
...
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