From 383e640097b9aa14996f00efc6eeae4e3678858b Mon Sep 17 00:00:00 2001 From: Leandro Roberto Date: Wed, 16 Jan 2019 23:18:43 -0200 Subject: [PATCH] =?UTF-8?q?ajuste=20no=20formul=C3=A1rio=20de=20proposi?= =?UTF-8?q?=C3=A7=C3=B5es=20para=20sapl=5Ffrontend?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/materia/forms.py | 16 ++++++++++------ sapl/templates/materia/proposicao_form.html | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/sapl/materia/forms.py b/sapl/materia/forms.py index f6811d984..52a7fb149 100644 --- a/sapl/materia/forms.py +++ b/sapl/materia/forms.py @@ -1403,12 +1403,16 @@ class ProposicaoForm(forms.ModelForm): fields.append(to_column(( 'texto_original', 7 if self.texto_articulado_proposicao else 12))) - fields.append(to_column((Fieldset(_('Outras informações - Vincular a Matéria Legislativa Existente'), - to_column(('tipo_materia', 12)), - to_column(('numero_materia', 6)), - to_column(('ano_materia', 6)) - ), 12)), - ) + fields.append( + to_column( + ( + Fieldset( + _('Outras informações - Vincular a Matéria Legislativa Existente'), + to_row([('tipo_materia', 12), ]), + to_row([('numero_materia', 6), + ('ano_materia', 6)]), + ), 12)), + ) self.helper = FormHelper() self.helper.layout = SaplFormLayout(*fields) diff --git a/sapl/templates/materia/proposicao_form.html b/sapl/templates/materia/proposicao_form.html index f9f9414b6..5a603d255 100644 --- a/sapl/templates/materia/proposicao_form.html +++ b/sapl/templates/materia/proposicao_form.html @@ -9,7 +9,7 @@ $("input[name=tipo_texto]").change(function(event) { if (this.value == 'D' && this.checked) $("#div_id_texto_original").removeClass('hidden'); - else if (this.value == 'D' && !this.checked) + else if (this.value == 'T' && this.checked) $("#div_id_texto_original").addClass('hidden'); });