Assign style if a str is passed
Otherwise assign self.help as passed. Co-authored-by: Dan Bungert <danielbungert@gmail.com>
This commit is contained in:
parent
eb722fef0b
commit
6d51deedb6
|
@ -305,10 +305,10 @@ class FormField(abc.ABC):
|
|||
def __init__(self, caption=None, help=None):
|
||||
self.caption = caption
|
||||
# Allows styling at instantiation
|
||||
if help is None or isinstance(help, tuple) or help is NO_HELP:
|
||||
self.help = help
|
||||
else:
|
||||
if isinstance(help, str):
|
||||
self.help = ('info_minor', help)
|
||||
else:
|
||||
self.help = help
|
||||
self.index = FormField.next_index
|
||||
FormField.next_index += 1
|
||||
|
||||
|
|
Loading…
Reference in New Issue