Add "text" type for new form fields

This commit is contained in:
Lance Edgar 2017-10-31 13:25:19 -07:00
parent c7855f2ca5
commit 5f04ac9cb4

View file

@ -323,6 +323,8 @@ class Form(object):
elif type_ == 'codeblock': elif type_ == 'codeblock':
self.set_renderer(key, self.render_codeblock) self.set_renderer(key, self.render_codeblock)
self.set_widget(key, dfwidget.TextAreaWidget(cols=80, rows=8)) self.set_widget(key, dfwidget.TextAreaWidget(cols=80, rows=8))
elif type_ == 'text':
self.set_widget(key, dfwidget.TextAreaWidget(cols=80, rows=8))
else: else:
raise ValueError("unknown type for '{}' field: {}".format(key, type_)) raise ValueError("unknown type for '{}' field: {}".format(key, type_))