Browse Source

Reformatação

pull/261/head
Eduardo Calil 9 years ago
committed by Marcio Mazza
parent
commit
56551af981
  1. 10
      materia/forms.py
  2. 11
      protocoloadm/forms.py

10
materia/forms.py

@ -90,7 +90,7 @@ class AcompanhamentoMateriaForm(ModelForm):
row1.append( row1.append(
Column(form_actions(save_label='Cadastrar'), css_class='col-md-2') Column(form_actions(save_label='Cadastrar'), css_class='col-md-2')
) )
self.helper = FormHelper() self.helper = FormHelper()
self.helper.layout = Layout( self.helper.layout = Layout(
@ -150,7 +150,7 @@ class RelatoriaForm(ModelForm):
] ]
widgets = { widgets = {
'data_designacao_relator': forms.DateInput(attrs={ 'data_designacao_relator': forms.DateInput(attrs={
'class': 'dateinput'}), 'class': 'dateinput'}),
'data_destituicao_relator': forms.DateInput(attrs={ 'data_destituicao_relator': forms.DateInput(attrs={
'class': 'dateinput'}), 'class': 'dateinput'}),
} }
@ -172,11 +172,11 @@ class TramitacaoForm(ModelForm):
widgets = { widgets = {
'data_tramitacao': forms.DateInput(attrs={ 'data_tramitacao': forms.DateInput(attrs={
'class': 'dateinput'}), 'class': 'dateinput'}),
'data_encaminhamento': forms.DateInput(attrs={ 'data_encaminhamento': forms.DateInput(attrs={
'class': 'dateinput'}), 'class': 'dateinput'}),
'data_fim_prazo': forms.DateInput(attrs={ 'data_fim_prazo': forms.DateInput(attrs={
'class': 'dateinput'}), 'class': 'dateinput'}),
} }
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):

11
protocoloadm/forms.py

@ -128,11 +128,10 @@ class AnularProcoloAdmForm(ModelForm):
get_field('ano').verbose_name, get_field('ano').verbose_name,
choices=RANGE_ANOS, choices=RANGE_ANOS,
widget=forms.Select(attrs={'class': 'selector'})) widget=forms.Select(attrs={'class': 'selector'}))
justificativa_anulacao = forms.CharField(required=True, justificativa_anulacao = forms.CharField(
label=Protocolo._meta. required=True,
get_field('justificativa_anulacao' label=Protocolo._meta.get_field('justificativa_anulacao').verbose_name,
).verbose_name, widget=forms.Textarea)
widget=forms.Textarea)
def clean(self): def clean(self):
cleaned_data = super(AnularProcoloAdmForm, self).clean() cleaned_data = super(AnularProcoloAdmForm, self).clean()
@ -154,7 +153,7 @@ class AnularProcoloAdmForm(ModelForm):
% (numero, ano)) % (numero, ano))
except ObjectDoesNotExist: except ObjectDoesNotExist:
raise forms.ValidationError( raise forms.ValidationError(
_("Protocolo %s/%s não existe" % (numero, ano))) _("Protocolo %s/%s não existe" % (numero, ano)))
class Meta: class Meta:
model = Protocolo model = Protocolo

Loading…
Cancel
Save