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
|
return self._help
|
||||||
elif self.field.help is not None:
|
elif self.field.help is not None:
|
||||||
if isinstance(self.field.help, str):
|
if isinstance(self.field.help, str):
|
||||||
return _(self.field.help)
|
return ('info_minor', _(self.field.help))
|
||||||
else:
|
else:
|
||||||
return self.field.help
|
return self.field.help
|
||||||
else:
|
else:
|
||||||
|
@ -304,7 +304,11 @@ class FormField(abc.ABC):
|
||||||
|
|
||||||
def __init__(self, caption=None, help=None):
|
def __init__(self, caption=None, help=None):
|
||||||
self.caption = caption
|
self.caption = caption
|
||||||
self.help = help
|
# Allows styling at instantiation
|
||||||
|
if isinstance(help, str):
|
||||||
|
self.help = ('info_minor', help)
|
||||||
|
else:
|
||||||
|
self.help = help
|
||||||
self.index = FormField.next_index
|
self.index = FormField.next_index
|
||||||
FormField.next_index += 1
|
FormField.next_index += 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue