From 0b9f093a9d1222690a77eff39b2fd4600a423f12 Mon Sep 17 00:00:00 2001 From: Ferry Boender Date: Thu, 2 Jul 2015 08:10:27 +0200 Subject: [PATCH] Removed field type 'number'. --- src/formrender.py | 12 ------------ src/webapp.py | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/formrender.py b/src/formrender.py index 5719b41..339c93a 100644 --- a/src/formrender.py +++ b/src/formrender.py @@ -36,9 +36,6 @@ class FormRender(object): u'value="{value}" size="{size}" ' u'class="{classes}" style="{style}" minlength="{minlen}" ' u' maxlength="{maxlen}" />', - "number": u'', "integer": u'', @@ -117,15 +114,6 @@ class FormRender(object): size=size, required=required, classes=classes, style=style) - def r_field_number(self, name, value, minval=None, maxval=None, - required=False, classes='', style=""): - """ - Render a number field to HTML. - """ - tpl = self.field_tpl['number'] - return tpl.format(name=name, value=value, minval=minval, maxval=maxval, - required=required, classes=classes, style=style) - def r_field_integer(self, name, value, minval=None, maxval=None, required=False, classes='', style=""): """ diff --git a/src/webapp.py b/src/webapp.py index df798be..04fe8b1 100644 --- a/src/webapp.py +++ b/src/webapp.py @@ -383,7 +383,7 @@ class ScriptFormWebApp(WebAppHandler): if field['type'] in ('string', 'text'): params['maxlen'] = field.get('maxlen', '') - if field['type'] in ('number', 'integer', 'float'): + if field['type'] in ('integer', 'float'): params['minval'] = field.get("min", '') params['maxval'] = field.get("max", '')