From c98cdb2352521036cbe4c7b91203e017d34873c5 Mon Sep 17 00:00:00 2001 From: Andrew Croce Date: Wed, 25 Jul 2018 13:11:35 -0400 Subject: [PATCH] options input module --- atst/ui_modules.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/atst/ui_modules.py b/atst/ui_modules.py index 6773b5c6..1ae08eeb 100644 --- a/atst/ui_modules.py +++ b/atst/ui_modules.py @@ -21,6 +21,16 @@ class TextInput(UIModule): placeholder=placeholder, description=input.description) +class OptionsInput(UIModule): + def render(self, input, inline=False): + return self.render_string( + "components/options_input.html.to", + input=input, + label=re.sub('<[^<]+?>', '', str(input.label)), + errors=input.errors, + description=input.description, + inline=inline) + class Icon(UIModule): def render(self, name, classes=''): with open('static/icons/%s.svg' % name) as svg: