Browse Source

Usar widget Textarea no lugar de Text para campos Charfield na interface administrativa dos diagnósticos

stable/1.0
Sesostris Vieira 12 years ago
parent
commit
3f848a8006
  1. 6
      sigi/apps/diagnosticos/forms.py

6
sigi/apps/diagnosticos/forms.py

@ -20,6 +20,12 @@ class DiagnosticoForm(BaseDynamicEntityForm):
""" """
model = Diagnostico model = Diagnostico
def __init__(self, *args, **kwargs):
super(DiagnosticoForm, self).__init__(*args, **kwargs)
for k, f in self.fields.iteritems():
if isinstance(f, CharField):
f.widget = forms.widgets.Textarea(attrs={'cols':'80'})
class DiagnosticoMobileForm(BaseDynamicEntityForm): class DiagnosticoMobileForm(BaseDynamicEntityForm):
"""Classe responsável por construir o formulário """Classe responsável por construir o formulário

Loading…
Cancel
Save