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
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Rafael Monnerat
erp5
Commits
16d4ea79
Commit
16d4ea79
authored
6 years ago
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Formulator: option value should not be an empty string
2nd try
parent
4bfcfe73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
16 deletions
+24
-16
product/Formulator/Widget.py
product/Formulator/Widget.py
+24
-16
No files found.
product/Formulator/Widget.py
View file @
16d4ea79
...
@@ -1156,16 +1156,20 @@ class ListWidget(SingleItemsWidget):
...
@@ -1156,16 +1156,20 @@ class ListWidget(SingleItemsWidget):
return
"
\
n
"
.
join
([
list_widget
,
input_hidden
])
return
"
\
n
"
.
join
([
list_widget
,
input_hidden
])
def
render_item
(
self
,
text
,
value
,
key
,
css_class
,
extra_item
):
def
render_item
(
self
,
text
,
value
,
key
,
css_class
,
extra_item
):
if
not
text
:
if
text
:
text
=
' '
return
self
.
render_element
(
'option'
,
contents
=
text
,
value
=
value
,
return
self
.
render_element
(
'option'
,
contents
=
text
,
value
=
value
,
extra
=
extra_item
)
extra
=
extra_item
)
else
:
return
self
.
render_element
(
'option'
,
label
=
' '
,
value
=
value
,
extra
=
extra_item
)
def
render_selected_item
(
self
,
text
,
value
,
key
,
css_class
,
extra_item
):
def
render_selected_item
(
self
,
text
,
value
,
key
,
css_class
,
extra_item
):
if
not
text
:
if
text
:
text
=
' '
return
self
.
render_element
(
'option'
,
contents
=
text
,
value
=
value
,
return
self
.
render_element
(
'option'
,
contents
=
text
,
value
=
value
,
selected
=
None
,
extra
=
extra_item
)
selected
=
None
,
extra
=
extra_item
)
else
:
return
self
.
render_element
(
'option'
,
label
=
' '
,
value
=
value
,
selected
=
None
,
extra
=
extra_item
)
ListWidgetInstance
=
ListWidget
()
ListWidgetInstance
=
ListWidget
()
...
@@ -1199,16 +1203,20 @@ class MultiListWidget(MultiItemsWidget):
...
@@ -1199,16 +1203,20 @@ class MultiListWidget(MultiItemsWidget):
return
"
\
n
"
.
join
([
multi_list
,
input_hidden
])
return
"
\
n
"
.
join
([
multi_list
,
input_hidden
])
def
render_item
(
self
,
text
,
value
,
key
,
css_class
,
extra_item
):
def
render_item
(
self
,
text
,
value
,
key
,
css_class
,
extra_item
):
if
not
text
:
if
text
:
text
=
' '
return
self
.
render_element
(
'option'
,
contents
=
text
,
value
=
value
,
return
self
.
render_element
(
'option'
,
contents
=
text
,
value
=
value
,
extra
=
extra_item
)
extra
=
extra_item
)
else
:
return
self
.
render_element
(
'option'
,
label
=
' '
,
value
=
value
,
extra
=
extra_item
)
def
render_selected_item
(
self
,
text
,
value
,
key
,
css_class
,
extra_item
):
def
render_selected_item
(
self
,
text
,
value
,
key
,
css_class
,
extra_item
):
if
not
text
:
if
text
:
text
=
' '
return
self
.
render_element
(
'option'
,
contents
=
text
,
value
=
value
,
return
self
.
render_element
(
'option'
,
contents
=
text
,
value
=
value
,
selected
=
None
,
extra
=
extra_item
)
selected
=
None
,
extra
=
extra_item
)
else
:
return
self
.
render_element
(
'option'
,
label
=
' '
,
value
=
value
,
selected
=
None
,
extra
=
extra_item
)
MultiListWidgetInstance
=
MultiListWidget
()
MultiListWidgetInstance
=
MultiListWidget
()
...
...
This diff is collapsed.
Click to expand it.
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