From 6a842b76b51927473d2b61e3f5500bca5da261c7 Mon Sep 17 00:00:00 2001 From: VictorFabreF Date: Fri, 23 Mar 2018 18:05:02 -0300 Subject: [PATCH] =?UTF-8?q?Ajusta=20empty-label=20de=20forms=20ao=20padr?= =?UTF-8?q?=C3=A3o=20usado=20(#1790)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/protocoloadm/forms.py | 10 +++++----- sapl/utils.py | 8 +++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/sapl/protocoloadm/forms.py b/sapl/protocoloadm/forms.py index 8f240ff69..37d888ec2 100644 --- a/sapl/protocoloadm/forms.py +++ b/sapl/protocoloadm/forms.py @@ -22,10 +22,10 @@ from .models import (DocumentoAcessorioAdministrativo, DocumentoAdministrativo, Protocolo, TipoDocumentoAdministrativo, TramitacaoAdministrativo) -TIPOS_PROTOCOLO = [('0', 'Recebido'), ('1', 'Enviado'), ('2', 'Interno'), ('', 'Todos')] +TIPOS_PROTOCOLO = [('0', 'Recebido'), ('1', 'Enviado'), ('2', 'Interno'), ('', '---------')] TIPOS_PROTOCOLO_CREATE = [('0', 'Recebido'), ('1', 'Enviado'), ('2', 'Interno')] -NATUREZA_PROCESSO = [('', 'Ambos'), +NATUREZA_PROCESSO = [('', '---------'), ('0', 'Administrativo'), ('1', 'Legislativo')] @@ -34,7 +34,7 @@ def ANO_CHOICES(): return [('', '---------')] + RANGE_ANOS -EM_TRAMITACAO = [('', 'Tanto Faz'), +EM_TRAMITACAO = [('', '---------'), (0, 'Sim'), (1, 'Não')] @@ -361,7 +361,7 @@ class ProtocoloMateriaForm(ModelForm): label=_('Tipo de Matéria'), required=True, queryset=TipoMateriaLegislativa.objects.all(), - empty_label='Selecione', + empty_label='------', ) numero_materia = forms.CharField( @@ -438,7 +438,7 @@ class ProtocoloMateriaForm(ModelForm): ('tipo_autor', 3), ('autor', 3)]) row2 = to_row( - [('vincular_materia', 4), + [(InlineRadios('vincular_materia'), 4), ('numero_materia', 4), ('ano_materia', 4), ]) row3 = to_row( diff --git a/sapl/utils.py b/sapl/utils.py index 38b05c9c3..a62625452 100644 --- a/sapl/utils.py +++ b/sapl/utils.py @@ -452,13 +452,11 @@ class MateriaPesquisaOrderingFilter(django_filters.OrderingFilter): class AnoNumeroOrderingFilter(django_filters.OrderingFilter): - choices = (('', 'Selecione...'), - ('CRE', 'Ordem Crescente'), - ('DEC', 'Ordem Decrescente'),) + choices = (('DEC', 'Ordem Decrescente'), + ('CRE', 'Ordem Crescente'),) order_by_mapping = { - '': [], - 'CRE': ['ano', 'numero'], 'DEC': ['-ano', '-numero'], + 'CRE': ['ano', 'numero'], } def __init__(self, *args, **kwargs):