diff --git a/owrx/form/__init__.py b/owrx/form/__init__.py index 2ba65ea..399665a 100644 --- a/owrx/form/__init__.py +++ b/owrx/form/__init__.py @@ -48,11 +48,19 @@ class TextInput(Input): class NumberInput(Input): + def __init__(self, id, label, infotext=None): + super().__init__(id, label, infotext) + self.step = None + def render_input(self, value): return """ - + """.format( - id=self.id, label=self.label, classes=self.input_classes(), value=value + id=self.id, + label=self.label, + classes=self.input_classes(), + value=value, + step='step="{0}"'.format(self.step) if self.step else "", ) def convert_value(self, v): @@ -63,6 +71,10 @@ class NumberInput(Input): class FloatInput(NumberInput): + def __init__(self, id, label, infotext=None): + super().__init__(id, label, infotext) + self.step = "any" + def convert_value(self, v): return float(v) @@ -70,7 +82,30 @@ class FloatInput(NumberInput): class LocationInput(Input): def render_input(self, value): # TODO make this work and pretty - return "Placeholder for a map widget to select receiver location" + return """ +