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