From 1fb50d5dfba440a5cb325b7ff8672a2b9d702358 Mon Sep 17 00:00:00 2001 From: cristian-longhi Date: Thu, 10 Aug 2023 18:12:20 -0300 Subject: [PATCH] =?UTF-8?q?Simplifica=C3=A7=C3=A3o=20da=20tela=20de=20pesq?= =?UTF-8?q?uisa=20de=20Mat=C3=A9ria=20Legislativa=20(#3662)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/materia/forms.py | 38 +++++++++++++------ .../materia/materialegislativa_filter.html | 17 +++++++++ 2 files changed, 44 insertions(+), 11 deletions(-) diff --git a/sapl/materia/forms.py b/sapl/materia/forms.py index 848314735..b1219d56c 100644 --- a/sapl/materia/forms.py +++ b/sapl/materia/forms.py @@ -2,7 +2,7 @@ import logging import os from crispy_forms.bootstrap import Alert, InlineRadios -from crispy_forms.layout import (Button, Field, Fieldset, HTML, Layout, Row) +from crispy_forms.layout import (Button, Field, Fieldset, HTML, Layout, Row, Div) from django import forms from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ObjectDoesNotExist, ValidationError @@ -1120,22 +1120,38 @@ class MateriaLegislativaFilterSet(django_filters.FilterSet): self.form.helper = SaplFormHelper() self.form.helper.form_method = 'GET' self.form.helper.layout = Layout( + Div( Fieldset(_('Pesquisa Básica'), - row1, row2), - + row1, row2, + HTML(autor_label), + HTML(autor_modal), + row4, + ), + Button('btn_pesquisa_avancada', 'Pesquisa Avançada >>>', + css_id='btn_pesquisa_avancada_id', + css_class='btn btn-dark', + onClick="pesquisaAvancada()", + style='margin-bottom: 2vh;font-weight: bold' + ), Fieldset(_('Como listar os resultados da pesquisa'), - row8 + row8, + css_class='pesquisa_avancada', + style='display: none;', ), Fieldset(_('Origem externa'), - row10, row11 + row10, row11, + css_class='pesquisa_avancada', + style='display: none;', ), - Fieldset(_('Pesquisa Avançada'), + Fieldset(_('Mais Opções de Pesquisa...'), row3, - HTML(autor_label), - HTML(autor_modal), - row4, row6, row7, row9, - form_actions(label=_('Pesquisar'))) - ) + row6, row7, row9, + css_class='pesquisa_avancada', + style='display: none;' + ), + form_actions(label=_('Pesquisar')), + ) + ) @property def qs(self): diff --git a/sapl/templates/materia/materialegislativa_filter.html b/sapl/templates/materia/materialegislativa_filter.html index bbb4fdfd5..afdb5e48c 100644 --- a/sapl/templates/materia/materialegislativa_filter.html +++ b/sapl/templates/materia/materialegislativa_filter.html @@ -200,3 +200,20 @@ {% endblock detail_content %} {% block table_content %} {% endblock table_content %} + {% block extra_js %} + + + {% endblock extra_js %} +