Merge pull request #1394 from CarlosNihelton/style-help-gray
Defaults help text style to gray
This commit is contained in:
commit
60953951fe
|
@ -249,7 +249,7 @@ class BoundFormField(object):
|
|||
return self._help
|
||||
elif self.field.help is not None:
|
||||
if isinstance(self.field.help, str):
|
||||
return _(self.field.help)
|
||||
return ('info_minor', _(self.field.help))
|
||||
else:
|
||||
return self.field.help
|
||||
else:
|
||||
|
@ -304,6 +304,10 @@ class FormField(abc.ABC):
|
|||
|
||||
def __init__(self, caption=None, help=None):
|
||||
self.caption = caption
|
||||
# Allows styling at instantiation
|
||||
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