Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
Commits
dbcaa640
Commit
dbcaa640
authored
May 04, 2018
by
Tomáš Peterka
Committed by
Tomáš Peterka
May 08, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[hal_json] Choose named prefix over "_" for private variables passed via forms
parent
60c42769
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/Base_callDialogMethod.py
...portal_skins/erp5_hal_json_style/Base_callDialogMethod.py
+2
-2
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Folder_doNothing.py
...emplateItem/portal_skins/erp5_ui_test/Folder_doNothing.py
+4
-5
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Folder_doNothing.xml
...mplateItem/portal_skins/erp5_ui_test/Folder_doNothing.xml
+1
-1
No files found.
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/Base_callDialogMethod.py
View file @
dbcaa640
...
...
@@ -203,7 +203,7 @@ if len(listbox_id_list):
# First check for an query in form parameters - if they are there
# that means previous view was a listbox with selected stuff so recover here
query
=
extra_param
.
get
(
"query"
,
None
)
select_all
=
extra_param
.
get
(
"_select_all"
,
0
)
select_all
=
extra_param
.
get
(
"
basedialog
_select_all"
,
0
)
# inject `uids` into Scripts **kwargs when we got any `query` (empty or filled)
if
query
is
not
None
:
...
...
@@ -216,7 +216,7 @@ if query is not None:
# early-stop if user selected all documents
if
query
==
""
and
select_all
==
0
and
dialog_method
!=
update_method
:
# do not interrupt on UPDATE
extra_param
[
"_select_all"
]
=
1
extra_param
[
"
basedialog
_select_all"
]
=
1
return
context
.
Base_renderForm
(
dialog_id
,
message
=
translate
(
"All documents are selected! Submit again to proceed or Cancel and narrow down your search."
),
...
...
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Folder_doNothing.py
View file @
dbcaa640
...
...
@@ -13,14 +13,13 @@ else:
if
kwargs
.
get
(
"update_method"
,
""
):
return
context
.
Base_renderForm
(
dialog_id
,
message
=
"Updated. "
+
message
)
if
_my_confirmation
==
0
:
# Here is an example of unfriendly confirmation Script which takes
# whole keep_item for itself!
if
donothing_confirmation
==
0
:
# Here is an example of an adversary Script which hijacks `keep_items`
# It should take keep_items from parameters, update it and pass it
#
along. But no programmer will ever comply with that so
we are ready!
#
through. But no programmer will ever comply therefor
we are ready!
return
context
.
Base_renderForm
(
dialog_id
,
message
=
"Submit again to confirm. "
+
message
,
level
=
'warning'
,
keep_items
=
{
'
_my
_confirmation'
:
1
})
keep_items
=
{
'
donothing
_confirmation'
:
1
})
return
context
.
Base_redirect
(
form_id
,
keep_items
=
{
"portal_status_message"
:
message
})
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Folder_doNothing.xml
View file @
dbcaa640
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
dialog_id, form_id, uids,
_my
_confirmation=0, **kwargs
</string>
</value>
<value>
<string>
dialog_id, form_id, uids,
donothing
_confirmation=0, **kwargs
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
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