|
|
@ -1,5 +1,5 @@ |
|
|
|
from crispy_forms.helper import FormHelper |
|
|
|
from crispy_forms.layout import Layout, Fieldset, ButtonHolder, Submit, MultiField, Div, Field |
|
|
|
from crispy_forms.layout import ButtonHolder, Fieldset, Layout, Submit |
|
|
|
from django import forms |
|
|
|
from django.core.urlresolvers import reverse |
|
|
|
from django.forms import ModelForm |
|
|
@ -7,7 +7,6 @@ from django.utils.translation import ugettext_lazy as _ |
|
|
|
from django.views.generic.edit import FormMixin |
|
|
|
from vanilla import GenericView |
|
|
|
|
|
|
|
|
|
|
|
import sapl |
|
|
|
from parlamentares.models import Filiacao, Parlamentar |
|
|
|
from sapl.crud import build_crud |
|
|
@ -67,7 +66,6 @@ comissao_crud = build_crud( |
|
|
|
|
|
|
|
class CadastrarComissaoForm(ModelForm): |
|
|
|
|
|
|
|
|
|
|
|
class Meta: |
|
|
|
|
|
|
|
model = Comissao |
|
|
@ -103,14 +101,13 @@ class CadastrarComissaoForm(ModelForm): |
|
|
|
row2 = sapl.layout.to_row( |
|
|
|
[('tipo', 3), |
|
|
|
('data_criacao', 3), |
|
|
|
('unidade_deliberativa',3), |
|
|
|
('data_extincao',3)]) |
|
|
|
('unidade_deliberativa', 3), |
|
|
|
('data_extincao', 3)]) |
|
|
|
|
|
|
|
row3 = sapl.layout.to_row( |
|
|
|
[('local_reuniao',4), |
|
|
|
('agenda_reuniao',4), |
|
|
|
('telefone_reuniao',4)]) |
|
|
|
|
|
|
|
[('local_reuniao', 4), |
|
|
|
('agenda_reuniao', 4), |
|
|
|
('telefone_reuniao', 4)]) |
|
|
|
|
|
|
|
row4 = sapl.layout.to_row( |
|
|
|
[('endereco_secretaria', 4), |
|
|
@ -118,20 +115,20 @@ class CadastrarComissaoForm(ModelForm): |
|
|
|
('fax_secretaria', 4)]) |
|
|
|
|
|
|
|
row5 = sapl.layout.to_row( |
|
|
|
[('secretario',6), |
|
|
|
('email',6)]) |
|
|
|
[('secretario', 6), |
|
|
|
('email', 6)]) |
|
|
|
|
|
|
|
row6 = sapl.layout.to_row( |
|
|
|
[('finalidade', 12)]) |
|
|
|
|
|
|
|
row7 = sapl.layout.to_row( |
|
|
|
[('apelido_temp', 9), |
|
|
|
('data_instalacao_temp',3)]) |
|
|
|
('data_instalacao_temp', 3)]) |
|
|
|
|
|
|
|
row8 = sapl.layout.to_row( |
|
|
|
[('data_final_prevista_temp',4), |
|
|
|
('data_prorrogada_temp',4), |
|
|
|
('data_fim_comissao',4)]) |
|
|
|
[('data_final_prevista_temp', 4), |
|
|
|
('data_prorrogada_temp', 4), |
|
|
|
('data_fim_comissao', 4)]) |
|
|
|
|
|
|
|
self.helper = FormHelper() |
|
|
|
self.helper.layout = Layout( |
|
|
@ -187,7 +184,6 @@ class CadastrarComissaoView(FormMixin, GenericView): |
|
|
|
return reverse('comissao:list') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ComposicaoForm(forms.Form): |
|
|
|
periodo = forms.CharField() |
|
|
|
|
|
|
|