From fa6894112ff8f0581699d6bab24ed372f8904f85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rog=C3=A9rio=20Fr=C3=A1?= Date: Thu, 8 Dec 2016 08:43:25 -0200 Subject: [PATCH] Update forms.py --- sapl/protocoloadm/forms.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/sapl/protocoloadm/forms.py b/sapl/protocoloadm/forms.py index 3e8a44ec5..539c89f50 100644 --- a/sapl/protocoloadm/forms.py +++ b/sapl/protocoloadm/forms.py @@ -275,7 +275,7 @@ class ProtocoloDocumentForm(ModelForm): tipo_documento = forms.ModelChoiceField( label=_('Tipo de Documento'), - required=False, + required=True, queryset=TipoDocumentoAdministrativo.objects.all(), empty_label='Selecione', ) @@ -332,6 +332,19 @@ class ProtocoloDocumentForm(ModelForm): class ProtocoloMateriaForm(ModelForm): autor = forms.IntegerField(widget=forms.HiddenInput(), required=False) + + tipo_materia = forms.ModelChoiceField( + label=_('Tipo de Matéria'), + required=True, + queryset=TipoDocumentoAdministrativo.objects.all(), + empty_label='Selecione', + ) + + numero_paginas = forms.CharField(label=_('Núm. Páginas'), required=True) + + observacao = forms.CharField(required=True, + widget=forms.Textarea, label='Observação') + def clean_autor(self): autor_field = self.cleaned_data['autor']