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 %} +