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. 8
      sigi/apps/diagnosticos/forms.py

8
sigi/apps/diagnosticos/forms.py

@ -19,7 +19,13 @@ class DiagnosticoForm(BaseDynamicEntityForm):
vinculando ao modelo 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):
"""Classe responsável por construir o formulário

Loading…
Cancel
Save