Commit f32420d9 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

Formultor: support input_type parameter in IntegerWidget.

parent 5729ef3a
...@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment