Browse Source

Refatora botão de submit de tela de pesquisa formulário para utilizar

crispy form

E comenta radio button com problema devido ao Bootstrap até encontrar
solução.
pull/202/head
Edward Ribeiro 9 years ago
parent
commit
dbcce4ad83
  1. 6
      protocoloadm/views.py
  2. 11
      templates/protocoloadm/protocolo_pesquisa.html

6
protocoloadm/views.py

@ -149,8 +149,8 @@ class ProtocoloForm(forms.Form):
('0', 'Administrativo'),
('1', 'Legislativo'),
('', 'Ambos')],
widget=forms.RadioSelect(
renderer=HorizontalRadioRenderer)
# widget=forms.RadioSelect(
# renderer=HorizontalRadioRenderer)
)
@ -203,7 +203,7 @@ class ProtocoloForm(forms.Form):
[('natureza_processo', 12)])
self.helper = FormHelper()
self.helper.layout = Layout(row1, row2, row3, row4, row5)
self.helper.layout = Layout(row1, row2, row3, row4, row5, form_actions(save_label='Pesquisar'))
super(ProtocoloForm, self).__init__(
*args, **kwargs)

11
templates/protocoloadm/protocolo_pesquisa.html

@ -3,12 +3,7 @@
{% load crispy_forms_tags %}
{% block detail_content %}
<form method="post">
{% csrf_token %}
<fieldset>
<legend>Pesquisa Avançada</legend>
{% crispy form %}
<input type="submit" value="Pesquisar" name="pesquisa" class="button primary"/>
</fieldset>
</form>
<legend>Pesquisa Avançada</legend>
{% crispy form %}
</fieldset>
{% endblock detail_content %}

Loading…
Cancel
Save