Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
erp5_rtl_support
Commits
f32420d9
Commit
f32420d9
authored
Jun 09, 2017
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Formultor: support input_type parameter in IntegerWidget.
parent
5729ef3a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
product/Formulator/Widget.py
product/Formulator/Widget.py
+3
-2
No files found.
product/Formulator/Widget.py
View file @
f32420d9
...
@@ -1749,9 +1749,10 @@ class IntegerWidget(TextWidget) :
...
@@ -1749,9 +1749,10 @@ class IntegerWidget(TextWidget) :
if
isinstance
(
value
,
float
):
if
isinstance
(
value
,
float
):
value
=
int
(
value
)
value
=
int
(
value
)
display_maxwidth
=
field
.
get_value
(
'display_maxwidth'
)
or
0
display_maxwidth
=
field
.
get_value
(
'display_maxwidth'
)
or
0
input_type
=
field
.
get_value
(
'input_type'
)
or
'text'
if
display_maxwidth
>
0
:
if
display_maxwidth
>
0
:
return
render_element
(
"input"
,
return
render_element
(
"input"
,
type
=
"text"
,
type
=
input_type
,
name
=
key
,
name
=
key
,
css_class
=
field
.
get_value
(
'css_class'
),
css_class
=
field
.
get_value
(
'css_class'
),
value
=
value
,
value
=
value
,
...
@@ -1760,7 +1761,7 @@ class IntegerWidget(TextWidget) :
...
@@ -1760,7 +1761,7 @@ class IntegerWidget(TextWidget) :
extra
=
field
.
get_value
(
'extra'
))
extra
=
field
.
get_value
(
'extra'
))
else
:
else
:
return
render_element
(
"input"
,
return
render_element
(
"input"
,
type
=
"text"
,
type
=
input_type
,
name
=
key
,
name
=
key
,
css_class
=
field
.
get_value
(
'css_class'
),
css_class
=
field
.
get_value
(
'css_class'
),
value
=
value
,
value
=
value
,
...
...
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