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
Alexander Emmerich
erp5
Commits
b43750df
Commit
b43750df
authored
Sep 11, 2017
by
Tomáš Peterka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[base_edit] if back to elif, more pep8 compliant, spelling
parent
e308b004
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/Base_edit.py
...emplateItem/portal_skins/erp5_hal_json_style/Base_edit.py
+2
-2
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.py
...core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.py
+4
-4
No files found.
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/Base_edit.py
View file @
b43750df
...
@@ -149,7 +149,7 @@ def editMatrixBox(matrixbox_field, matrixbox):
...
@@ -149,7 +149,7 @@ def editMatrixBox(matrixbox_field, matrixbox):
tab_ids
=
map
(
lambda
x
:
x
[
0
],
tabs
)
tab_ids
=
map
(
lambda
x
:
x
[
0
],
tabs
)
extra_dimension_category_list_list
=
[[
category
for
category
,
label
in
dimension_list
]
for
dimension_list
in
extra_dimension_list_list
]
extra_dimension_category_list_list
=
[[
category
for
category
,
label
in
dimension_list
]
for
dimension_list
in
extra_dimension_list_list
]
# There are
3
cases
# There are
4
cases
# Case 1: we do 1 dimensional matrix
# Case 1: we do 1 dimensional matrix
# Case 2: we do 2 dimensional matrix
# Case 2: we do 2 dimensional matrix
# Case 3: we do 2 dimensional matrix + tabs
# Case 3: we do 2 dimensional matrix + tabs
...
@@ -227,7 +227,7 @@ try:
...
@@ -227,7 +227,7 @@ try:
if
(
field_meta_type
==
'ListBox'
):
if
(
field_meta_type
==
'ListBox'
):
editListBox
(
field
,
request
.
get
(
field
.
id
))
editListBox
(
field
,
request
.
get
(
field
.
id
))
if
(
field_meta_type
==
'MatrixBox'
):
el
if
(
field_meta_type
==
'MatrixBox'
):
editMatrixBox
(
field
,
request
.
get
(
field
.
id
))
editMatrixBox
(
field
,
request
.
get
(
field
.
id
))
# Return parsed values
# Return parsed values
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.py
View file @
b43750df
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
:param silent: int (0|1) means that the edit action is not invoked by a form
:param silent: int (0|1) means that the edit action is not invoked by a form
submit but rather by an internal code thus the return value
submit but rather by an internal code thus the return value
contains as much useful
l
info as possible
contains as much useful info as possible
TODO: split the generic form validation logic
TODO: split the generic form validation logic
from the context update logic
from the context update logic
...
@@ -101,7 +101,7 @@ def editMatrixBox(matrixbox_field, matrixbox):
...
@@ -101,7 +101,7 @@ def editMatrixBox(matrixbox_field, matrixbox):
portal_type
=
matrixbox_field
.
get_value
(
'cell_portal_type'
)
portal_type
=
matrixbox_field
.
get_value
(
'cell_portal_type'
)
getter_method
=
matrixbox_field
.
get_value
(
'getter_method'
)
getter_method
=
matrixbox_field
.
get_value
(
'getter_method'
)
if
getter_method
not
in
(
None
,
''
):
if
getter_method
not
in
(
None
,
''
):
matrix_context
=
getattr
(
context
,
getter_method
)()
matrix_context
=
getattr
(
context
,
getter_method
)()
else
:
else
:
matrix_context
=
context
matrix_context
=
context
...
@@ -147,7 +147,7 @@ def editMatrixBox(matrixbox_field, matrixbox):
...
@@ -147,7 +147,7 @@ def editMatrixBox(matrixbox_field, matrixbox):
tab_ids
=
map
(
lambda
x
:
x
[
0
],
tabs
)
tab_ids
=
map
(
lambda
x
:
x
[
0
],
tabs
)
extra_dimension_category_list_list
=
[[
category
for
category
,
label
in
dimension_list
]
for
dimension_list
in
extra_dimension_list_list
]
extra_dimension_category_list_list
=
[[
category
for
category
,
label
in
dimension_list
]
for
dimension_list
in
extra_dimension_list_list
]
# There are
3
cases
# There are
4
cases
# Case 1: we do 1 dimensional matrix
# Case 1: we do 1 dimensional matrix
# Case 2: we do 2 dimensional matrix
# Case 2: we do 2 dimensional matrix
# Case 3: we do 2 dimensional matrix + tabs
# Case 3: we do 2 dimensional matrix + tabs
...
@@ -225,7 +225,7 @@ try:
...
@@ -225,7 +225,7 @@ try:
# Kato: following fields should implement 'Editors' so we can delete those lines
# Kato: following fields should implement 'Editors' so we can delete those lines
if
(
field_meta_type
==
'ListBox'
):
if
(
field_meta_type
==
'ListBox'
):
editListBox
(
field
,
request
.
get
(
field
.
id
))
editListBox
(
field
,
request
.
get
(
field
.
id
))
if
(
field_meta_type
==
'MatrixBox'
):
el
if
(
field_meta_type
==
'MatrixBox'
):
editMatrixBox
(
field
,
request
.
get
(
field
.
id
))
editMatrixBox
(
field
,
request
.
get
(
field
.
id
))
# Return parsed values
# Return parsed values
...
...
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