Example #1
0
    def __init__(self, *args, **kwargs):

        row1 = crispy_layout_mixin.to_row(
            [('codigo', 2),
             ('nome', 5),
             ('sigla', 5)])

        row2 = crispy_layout_mixin.to_row(
            [('endereco', 8),
             ('cep', 4)])

        row3 = crispy_layout_mixin.to_row(
            [('municipio', 10),
             ('uf', 2)])

        row4 = crispy_layout_mixin.to_row(
            [('telefone', 6),
             ('fax', 6)])

        row5 = crispy_layout_mixin.to_row(
            [('logotipo', 12)])

        row6 = crispy_layout_mixin.to_row(
            [('endereco_web', 12)])

        row7 = crispy_layout_mixin.to_row(
            [('email', 12)])

        row8 = crispy_layout_mixin.to_row(
            [('informacao_geral', 12)])

        self.helper = FormHelper()
        self.helper.layout = Layout(
            Fieldset(
                _('Dados Básicos'),
                row1,
                row2,
                row3,
                row4,
                row5,
                HTML("""
  <div class="col-md-12">
    {% if not form.fotografia.errors and form.fotografia.value %}
    <img class="img-responsive" width="225" height="300"
         src="{{ MEDIA_URL }}{{ form.logotipo.value }}">
         <br />
    <input type="submit"
           name="remover"
           id="remover"
           class="btn btn-warning"
           value="Remover Logo"/>
     {% endif %}
   </div>"""),
                row6,
                row7,
                row8,
                form_actions()
            )
        )
        super(CasaLegislativaTabelaAuxForm, self).__init__(*args, **kwargs)
Example #2
0
    def __init__(self, *args, **kwargs):
        super(DocumentoAdministrativoFilterSet, self).__init__(*args, **kwargs)

        local_atual = 'tramitacaoadministrativo__unidade_tramitacao_destino'
        self.filters['tipo'].label = 'Tipo de Documento'
        self.filters['tramitacaoadministrativo__status'].label = 'Situação'
        self.filters[local_atual].label = 'Localização Atual'

        row1 = crispy_layout_mixin.to_row([('tipo', 6), ('numero', 6)])

        row2 = crispy_layout_mixin.to_row([('ano', 4), ('numero_protocolo', 4),
                                           ('data', 4)])

        row3 = crispy_layout_mixin.to_row([('interessado', 4), ('assunto', 4),
                                           ('tramitacao', 4)])

        row4 = crispy_layout_mixin.to_row([
            ('tramitacaoadministrativo__unidade_tramitacao_destino', 6),
            ('tramitacaoadministrativo__status', 6)
        ])

        row5 = crispy_layout_mixin.to_row([('o', 12)])

        self.form.helper = FormHelper()
        self.form.helper.form_method = 'GET'
        self.form.helper.layout = Layout(
            Fieldset(_('Pesquisar Documento'), row1, row2, row3, row4, row5,
                     form_actions(save_label='Pesquisar')))
Example #3
0
    def __init__(self, excluir=False, *args, **kwargs):

        row1 = crispy_layout_mixin.to_row(
            [('tipo', 4),
             ('nome', 4),
             ('data', 4)])
        row2 = crispy_layout_mixin.to_row(
            [('autor', 12)])
        row3 = crispy_layout_mixin.to_row(
            [('arquivo', 12)])
        row4 = crispy_layout_mixin.to_row(
            [('assunto', 12)])

        more = []
        if excluir:
            more = [Submit('Excluir', 'Excluir')]

        self.helper = FormHelper()
        self.helper.layout = Layout(
            Fieldset(
                _('Incluir Documento Acessório'),
                row1, row2, row3, row4,
                form_actions(more=more)
            )
        )
        super(DocumentoAcessorioAdministrativoForm, self).__init__(
            *args, **kwargs)
Example #4
0
    def __init__(self, *args, **kwargs):

        row1 = crispy_layout_mixin.to_row(
            [(InlineRadios('numeracao'), 12)])
        row2 = crispy_layout_mixin.to_row(
            [('tipo_materia', 4),
             (InlineRadios('tipo_protocolo'), 4),
             ('numero_paginas', 4)])
        row3 = crispy_layout_mixin.to_row(
            [('autor', 0),
             (Button('pesquisar',
                     'Pesquisar Autor',
                     css_class='btn btn-primary btn-sm'), 2),
             (Button('limpar',
                     'limpar Autor',
                     css_class='btn btn-primary btn-sm'), 10)])
        row4 = crispy_layout_mixin.to_row(
            [('observacao', 12)])

        self.helper = FormHelper()
        self.helper.layout = Layout(
            Fieldset(_('Protocolo - Opção de Numeração'), row1),
            Fieldset(_('Identificação da Matéria'),
                     row2,
                     HTML(sapl.utils.autor_label),
                     HTML(sapl.utils.autor_modal),
                     row3,
                     row4,
                     form_actions(save_label='Protocolar Matéria')
                     )
        )

        super(ProtocoloMateriaForm, self).__init__(
            *args, **kwargs)
Example #5
0
    def __init__(self, *args, **kwargs):

        row1 = crispy_layout_mixin.to_row(
            [(InlineRadios('numeracao'), 12)])
        row2 = crispy_layout_mixin.to_row(
            [(InlineRadios('tipo_protocolo'), 12)])
        row3 = crispy_layout_mixin.to_row(
            [('tipo_documento', 6),
             ('num_paginas', 6)])
        row4 = crispy_layout_mixin.to_row(
            [('assunto', 12)])
        row5 = crispy_layout_mixin.to_row(
            [('interessado', 12)])
        row6 = crispy_layout_mixin.to_row(
            [('observacao', 12)])

        self.helper = FormHelper()
        self.helper.layout = Layout(
            Fieldset(_('Protocolo - Opção de Numeração'), row1),
            Fieldset(_('Identificação de Documento'),
                     row2,
                     row3,
                     row4,
                     row5,
                     row6,
                     HTML("&nbsp;"),
                     form_actions(save_label=_('Protocolar Documento'))
                     )
        )
        super(ProtocoloDocumentForm, self).__init__(
            *args, **kwargs)
Example #6
0
    def __init__(self, *args, **kwargs):

        row1 = crispy_layout_mixin.to_row([(InlineRadios('numeracao'), 12)])
        row2 = crispy_layout_mixin.to_row([('tipo_materia', 4),
                                           (InlineRadios('tipo_protocolo'), 4),
                                           ('numero_paginas', 4)])
        row3 = crispy_layout_mixin.to_row([
            ('autor', 0),
            (Button('pesquisar',
                    'Pesquisar Autor',
                    css_class='btn btn-primary btn-sm'), 2),
            (Button('limpar',
                    'limpar Autor',
                    css_class='btn btn-primary btn-sm'), 10)
        ])
        row4 = crispy_layout_mixin.to_row([('observacao', 12)])

        self.helper = FormHelper()
        self.helper.layout = Layout(
            Fieldset(_('Protocolo - Opção de Numeração'), row1),
            Fieldset(_('Identificação da Matéria'), row2,
                     HTML(sapl.utils.autor_label),
                     HTML(sapl.utils.autor_modal), row3, row4,
                     form_actions(save_label='Protocolar Matéria')))

        super(ProtocoloMateriaForm, self).__init__(*args, **kwargs)
Example #7
0
    def __init__(self, *args, **kwargs):
        self.helper = FormHelper()

        row1 = crispy_layout_mixin.to_row(
            [('parlamentar_id', 4),
             ('cargo', 4),
             ('titular', 4)])

        row2 = crispy_layout_mixin.to_row(
            [('data_designacao', 6),
             ('data_desligamento', 6)])

        row3 = crispy_layout_mixin.to_row(
            [('motivo_desligamento', 12)])

        row4 = crispy_layout_mixin.to_row(
            [('observacao', 12)])

        self.helper.layout = Layout(
            Fieldset(
                _('Cadastro de Parlamentar em Comissão'),
                row1, row2, row3, row4
            ),
            form_actions()
        )
        super(ParticipacaoCadastroForm, self).__init__(*args, **kwargs)
Example #8
0
    def __init__(self, *args, **kwargs):

        row1 = crispy_layout_mixin.to_row(
            [('tipo', 4), ('numero', 4), ('ano', 4)])

        row2 = crispy_layout_mixin.to_row(
            [('data', 6), ('numero_protocolo', 6)])

        row3 = crispy_layout_mixin.to_row(
            [('assunto', 12)])

        row4 = crispy_layout_mixin.to_row(
            [('interessado', 9), ('tramitacao', 3)])

        row5 = crispy_layout_mixin.to_row(
            [('texto_integral', 12)])

        row6 = crispy_layout_mixin.to_row(
            [('dias_prazo', 6), ('data_fim_prazo', 6)])

        row7 = crispy_layout_mixin.to_row(
            [('observacao', 12)])

        self.helper = FormHelper()
        self.helper.layout = Layout(
            Fieldset(_('Identificação Básica'),
                     row1, row2, row3, row4, row5),
            Fieldset(_('Outras Informações'),
                     row6, row7),
            form_actions(more=[Submit('Excluir', 'Excluir')]),
        )
        super(DocumentoAdministrativoForm, self).__init__(
            *args, **kwargs)
Example #9
0
    def __init__(self, *args, **kwargs):
        super(ProtocoloFilterSet, self).__init__(*args, **kwargs)

        self.filters['autor'].label = 'Tipo de Matéria'
        self.filters['assunto_ementa'].label = 'Assunto'

        row1 = crispy_layout_mixin.to_row([('numero', 4), ('ano', 4),
                                           ('data', 4)])

        row2 = crispy_layout_mixin.to_row([('tipo_documento', 4),
                                           ('tipo_protocolo', 4),
                                           ('tipo_materia', 4)])

        row3 = crispy_layout_mixin.to_row([('interessado', 6),
                                           ('assunto_ementa', 6)])

        row4 = crispy_layout_mixin.to_row([
            ('autor', 0),
            (Button('pesquisar',
                    'Pesquisar Autor',
                    css_class='btn btn-primary btn-sm'), 2),
            (Button('limpar',
                    'Limpar Autor',
                    css_class='btn btn-primary btn-sm'), 10)
        ])
        row5 = crispy_layout_mixin.to_row([('tipo_processo', 12)])
        row6 = crispy_layout_mixin.to_row([('o', 12)])

        self.form.helper = FormHelper()
        self.form.helper.form_method = 'GET'
        self.form.helper.layout = Layout(
            Fieldset(_('Pesquisar Protocolo'), row1, row2, row3,
                     HTML(sapl.utils.autor_label),
                     HTML(sapl.utils.autor_modal), row4, row5, row6,
                     form_actions(save_label='Pesquisar')))
Example #10
0
    def __init__(self, *args, **kwargs):

        row1 = crispy_layout_mixin.to_row([('tipo', 4), ('numero', 4),
                                           ('ano', 4)])

        row2 = crispy_layout_mixin.to_row([('data', 6),
                                           ('numero_protocolo', 6)])

        row3 = crispy_layout_mixin.to_row([('assunto', 12)])

        row4 = crispy_layout_mixin.to_row([('interessado', 9),
                                           ('tramitacao', 3)])

        row5 = crispy_layout_mixin.to_row([('texto_integral', 12)])

        row6 = crispy_layout_mixin.to_row([('dias_prazo', 6),
                                           ('data_fim_prazo', 6)])

        row7 = crispy_layout_mixin.to_row([('observacao', 12)])

        self.helper = FormHelper()
        self.helper.layout = Layout(
            Fieldset(_('Identificação Básica'), row1, row2, row3, row4, row5),
            Fieldset(_('Outras Informações'), row6, row7),
            form_actions(more=[Submit('Excluir', 'Excluir')]),
        )
        super(DocumentoAdministrativoForm, self).__init__(*args, **kwargs)
Example #11
0
 def __init__(self, *args, **kwargs):
     self.helper = FormHelper()
     self.helper.layout = Layout(
         Fieldset(_('Incluir Tramitação'), 'data_tramitacao',
                  'unidade_tramitacao_local', 'status',
                  'unidade_tramitacao_destino', 'data_encaminhamento',
                  'data_fim_prazo', 'texto'),
         Field('documento', type="hidden"), form_actions())
     super(TramitacaoAdmForm, self).__init__(*args, **kwargs)
Example #12
0
    def __init__(self, *args, **kwargs):

        row1 = crispy_layout_mixin.to_row([('numero', 6), ('ano', 6)])
        row2 = crispy_layout_mixin.to_row([('justificativa_anulacao', 12)])

        self.helper = FormHelper()
        self.helper.layout = Layout(
            Fieldset(_('Identificação do Protocolo'), row1, row2,
                     HTML("&nbsp;"), form_actions(save_label='Anular')))
        super(AnularProcoloAdmForm, self).__init__(*args, **kwargs)
Example #13
0
    def __init__(self, *args, **kwargs):

        row1 = crispy_layout_mixin.to_row([('email', 10)])

        row1.append(
            Column(form_actions(save_label='Cadastrar'), css_class='col-md-2'))

        self.helper = FormHelper()
        self.helper.layout = Layout(
            Fieldset(_('Acompanhamento de Matéria por e-mail'), row1))
        super(AcompanhamentoMateriaForm, self).__init__(*args, **kwargs)
Example #14
0
 def __init__(self, *args, **kwargs):
     super(RecuperarSenhaEmailForm, self).__init__(*args, **kwargs)
     row1 = crispy_layout_mixin.to_row([('email', 6)])
     self.helper = FormHelper()
     self.helper.layout = Layout(
         Fieldset(
             _('Recuperar Senha'), row1,
             form_actions(more=[
                 Submit('Cancelar',
                        'Cancelar',
                        style='background-color:black; color:white;')
             ])))
Example #15
0
    def __init__(self, *args, **kwargs):
        super(SessaoPlenariaFilterSet, self).__init__(*args, **kwargs)

        row1 = crispy_layout_mixin.to_row([('data_inicio__year', 3),
                                           ('data_inicio__month', 3),
                                           ('data_inicio__day', 3),
                                           ('tipo', 3)])

        self.form.helper = FormHelper()
        self.form.helper.form_method = 'GET'
        self.form.helper.layout = Layout(
            Fieldset(_('Pesquisa de Sessao Plenária'), row1,
                     form_actions(save_label='Pesquisar')))
Example #16
0
    def __init__(self, *args, **kwargs):
        super(MateriaLegislativaFilterSet, self).__init__(*args, **kwargs)

        self.filters['tipo'].label = 'Tipo de Matéria'
        self.filters['autoria__autor__tipo'].label = 'Tipo de Autor'
        self.filters['autoria__partido'].label = 'Partido do Autor'
        self.filters['relatoria__parlamentar_id'].label = 'Relatoria'

        row1 = crispy_layout_mixin.to_row(
            [('tipo', 12)])
        row2 = crispy_layout_mixin.to_row(
            [('numero', 4),
             ('ano', 4),
             ('numero_protocolo', 4)])
        row3 = crispy_layout_mixin.to_row(
            [('data_apresentacao', 6),
             ('data_publicacao', 6)])
        row4 = crispy_layout_mixin.to_row(
            [('autoria__autor', 0),
             (Button('pesquisar',
                     'Pesquisar Autor',
                     css_class='btn btn-primary btn-sm'), 2),
             (Button('limpar',
                     'limpar Autor',
                     css_class='btn btn-primary btn-sm'), 10)])
        row5 = crispy_layout_mixin.to_row(
            [('autoria__autor__tipo', 6),
             ('autoria__partido', 6)])
        row6 = crispy_layout_mixin.to_row(
            [('relatoria__parlamentar_id', 6),
             ('local_origem_externa', 6)])
        row7 = crispy_layout_mixin.to_row(
            [('tramitacao__unidade_tramitacao_destino', 6),
             ('tramitacao__status', 6)])
        row8 = crispy_layout_mixin.to_row(
            [('em_tramitacao', 6),
             ('o', 6)])
        row9 = crispy_layout_mixin.to_row(
            [('ementa', 12)])

        self.form.helper = FormHelper()
        self.form.helper.form_method = 'GET'
        self.form.helper.layout = Layout(
            Fieldset(_('Pesquisa de Matéria'),
                     row1, row2, row3,
                     HTML(sapl.utils.autor_label),
                     HTML(sapl.utils.autor_modal),
                     row4, row5, row6, row7, row8, row9,
                     form_actions(save_label='Pesquisar'))
        )
Example #17
0
 def __init__(self, *args, **kwargs):
     super(RecuperacaoMudarSenhaForm, self).__init__(*args, **kwargs)
     self.fields['new_password1'].help_text = ''
     row1 = crispy_layout_mixin.to_row([('new_password1', 6),
                                        ('new_password2', 6)])
     self.helper = FormHelper()
     self.helper.layout = Layout(
         Fieldset(
             _(''), row1,
             form_actions(more=[
                 Submit('Cancelar',
                        'Cancelar',
                        style='background-color:black; color:white;')
             ])))
Example #18
0
 def __init__(self, *args, **kwargs):
     super(MudarSenhaForm, self).__init__(*args, **kwargs)
     row1 = crispy_layout_mixin.to_row([('password', 6),
                                        ('password_confirm', 6)])
     row2 = crispy_layout_mixin.to_row([('captcha', 12)])
     self.helper = FormHelper()
     self.helper.layout = Layout(
         Fieldset(
             _('Mudar Senha'), row1, row2,
             form_actions(more=[
                 Submit('Cancelar',
                        'Cancelar',
                        style='background-color:black; color:white;')
             ])))
Example #19
0
 def __init__(self, *args, **kwargs):
     super(HabilitarEditForm, self).__init__(*args, **kwargs)
     row1 = crispy_layout_mixin.to_row([('nome_completo', 4), ('cpf', 4),
                                        ('email', 4)])
     row2 = crispy_layout_mixin.to_row([('habilitado', 12)])
     self.helper = FormHelper()
     self.helper.layout = Layout(
         Fieldset(
             _('Editar usuário'), row1, row2,
             form_actions(more=[
                 Submit('Cancelar',
                        'Cancelar',
                        style='background-color:black; color:white;')
             ])))
Example #20
0
    def __init__(self, *args, **kwargs):

        row1 = crispy_layout_mixin.to_row([('email', 10)])

        row1.append(
            Column(form_actions(save_label='Cadastrar'), css_class='col-md-2')
        )

        self.helper = FormHelper()
        self.helper.layout = Layout(
            Fieldset(
                _('Acompanhamento de Matéria por e-mail'), row1
            )
        )
        super(AcompanhamentoMateriaForm, self).__init__(*args, **kwargs)
Example #21
0
    def __init__(self, *args, **kwargs):
        super(SessaoPlenariaFilterSet, self).__init__(*args, **kwargs)

        row1 = crispy_layout_mixin.to_row(
            [('data_inicio__year', 3),
             ('data_inicio__month', 3),
             ('data_inicio__day', 3),
             ('tipo', 3)])

        self.form.helper = FormHelper()
        self.form.helper.form_method = 'GET'
        self.form.helper.layout = Layout(
            Fieldset(_('Pesquisa de Sessao Plenária'),
                     row1,
                     form_actions(save_label='Pesquisar'))
        )
Example #22
0
 def __init__(self, *args, **kwargs):
     super(RecuperarSenhaEmailForm, self).__init__(*args, **kwargs)
     row1 = crispy_layout_mixin.to_row(
         [('email', 6)])
     self.helper = FormHelper()
     self.helper.layout = Layout(
         Fieldset(_('Recuperar Senha'),
                  row1,
                  form_actions(
                     more=[
                         Submit(
                             'Cancelar',
                             'Cancelar',
                             style='background-color:black; color:white;')])
                  )
     )
Example #23
0
 def __init__(self, *args, **kwargs):
     self.helper = FormHelper()
     self.helper.layout = Layout(
         Fieldset(_('Incluir Tramitação'),
                  'data_tramitacao',
                  'unidade_tramitacao_local',
                  'status',
                  'unidade_tramitacao_destino',
                  'data_encaminhamento',
                  'data_fim_prazo',
                  'texto'),
         Field('documento', type="hidden"),
         form_actions()
     )
     super(TramitacaoAdmForm, self).__init__(
         *args, **kwargs)
Example #24
0
    def __init__(self, *args, **kwargs):

        row1 = crispy_layout_mixin.to_row([('tipo', 12)])

        row2 = crispy_layout_mixin.to_row([('numero', 6), ('ano', 6)])

        row3 = crispy_layout_mixin.to_row([('periodo_inicial', 6),
                                           ('periodo_final', 6)])

        row4 = crispy_layout_mixin.to_row([('publicacao_inicial', 6),
                                           ('publicacao_final', 6)])

        self.helper = FormHelper()
        self.helper.layout = Layout(
            Fieldset('Pesquisa Norma Juridica', row1, row2, row3, row4),
            form_actions(save_label='Pesquisar'))
        super(NormaJuridicaPesquisaForm, self).__init__(*args, **kwargs)
Example #25
0
    def __init__(self, *args, **kwargs):

        row1 = crispy_layout_mixin.to_row([(InlineRadios('numeracao'), 12)])
        row2 = crispy_layout_mixin.to_row([(InlineRadios('tipo_protocolo'), 12)
                                           ])
        row3 = crispy_layout_mixin.to_row([('tipo_documento', 6),
                                           ('num_paginas', 6)])
        row4 = crispy_layout_mixin.to_row([('assunto', 12)])
        row5 = crispy_layout_mixin.to_row([('interessado', 12)])
        row6 = crispy_layout_mixin.to_row([('observacao', 12)])

        self.helper = FormHelper()
        self.helper.layout = Layout(
            Fieldset(_('Protocolo - Opção de Numeração'), row1),
            Fieldset(_('Identificação de Documento'), row2, row3, row4, row5,
                     row6, HTML("&nbsp;"),
                     form_actions(save_label=_('Protocolar Documento'))))
        super(ProtocoloDocumentForm, self).__init__(*args, **kwargs)
Example #26
0
    def __init__(self, excluir=False, *args, **kwargs):

        row1 = crispy_layout_mixin.to_row([('tipo', 4), ('nome', 4),
                                           ('data', 4)])
        row2 = crispy_layout_mixin.to_row([('autor', 12)])
        row3 = crispy_layout_mixin.to_row([('arquivo', 12)])
        row4 = crispy_layout_mixin.to_row([('assunto', 12)])

        more = []
        if excluir:
            more = [Submit('Excluir', 'Excluir')]

        self.helper = FormHelper()
        self.helper.layout = Layout(
            Fieldset(_('Incluir Documento Acessório'), row1, row2, row3, row4,
                     form_actions(more=more)))
        super(DocumentoAcessorioAdministrativoForm,
              self).__init__(*args, **kwargs)
Example #27
0
 def __init__(self, *args, **kwargs):
     super(HabilitarEditForm, self).__init__(*args, **kwargs)
     row1 = crispy_layout_mixin.to_row(
         [('nome_completo', 4),
          ('cpf', 4),
          ('email', 4)])
     row2 = crispy_layout_mixin.to_row([('habilitado', 12)])
     self.helper = FormHelper()
     self.helper.layout = Layout(
         Fieldset(
             _('Editar usuário'), row1, row2, form_actions(
                 more=[
                     Submit(
                         'Cancelar',
                         'Cancelar',
                         style='background-color:black; color:white;')])
         )
     )
Example #28
0
 def __init__(self, *args, **kwargs):
     super(RecuperacaoMudarSenhaForm, self).__init__(*args, **kwargs)
     self.fields['new_password1'].help_text = ''
     row1 = crispy_layout_mixin.to_row(
         [('new_password1', 6),
          ('new_password2', 6)])
     self.helper = FormHelper()
     self.helper.layout = Layout(
         Fieldset(_(''),
                  row1,
                  form_actions(
                     more=[
                         Submit(
                             'Cancelar',
                             'Cancelar',
                             style='background-color:black; color:white;')])
                  )
     )
Example #29
0
 def __init__(self, *args, **kwargs):
     super(MudarSenhaForm, self).__init__(*args, **kwargs)
     row1 = crispy_layout_mixin.to_row(
         [('password', 6),
          ('password_confirm', 6)])
     row2 = crispy_layout_mixin.to_row([('captcha', 12)])
     self.helper = FormHelper()
     self.helper.layout = Layout(
         Fieldset(
             _('Mudar Senha'), row1, row2,
             form_actions(
                 more=[
                     Submit(
                         'Cancelar',
                         'Cancelar',
                         style='background-color:black; color:white;')])
         )
     )
Example #30
0
    def __init__(self, *args, **kwargs):
        super(ProtocoloFilterSet, self).__init__(*args, **kwargs)

        self.filters['autor'].label = 'Tipo de Matéria'
        self.filters['assunto_ementa'].label = 'Assunto'

        row1 = crispy_layout_mixin.to_row(
            [('numero', 4),
             ('ano', 4),
             ('data', 4)])

        row2 = crispy_layout_mixin.to_row(
            [('tipo_documento', 4),
             ('tipo_protocolo', 4),
             ('tipo_materia', 4)])

        row3 = crispy_layout_mixin.to_row(
            [('interessado', 6),
             ('assunto_ementa', 6)])

        row4 = crispy_layout_mixin.to_row(
                 [('autor', 0),
                  (Button('pesquisar',
                          'Pesquisar Autor',
                          css_class='btn btn-primary btn-sm'), 2),
                  (Button('limpar',
                          'Limpar Autor',
                          css_class='btn btn-primary btn-sm'), 10)])
        row5 = crispy_layout_mixin.to_row(
            [('tipo_processo', 12)])
        row6 = crispy_layout_mixin.to_row(
            [('o', 12)])

        self.form.helper = FormHelper()
        self.form.helper.form_method = 'GET'
        self.form.helper.layout = Layout(
            Fieldset(_('Pesquisar Protocolo'),
                     row1, row2,
                     row3,
                     HTML(sapl.utils.autor_label),
                     HTML(sapl.utils.autor_modal),
                     row4, row5, row6,
                     form_actions(save_label='Pesquisar'))
            )
Example #31
0
    def __init__(self, *args, **kwargs):

        row1 = crispy_layout_mixin.to_row(
            [('numero', 6),
             ('ano', 6)])
        row2 = crispy_layout_mixin.to_row(
            [('justificativa_anulacao', 12)])

        self.helper = FormHelper()
        self.helper.layout = Layout(
            Fieldset(_('Identificação do Protocolo'),
                     row1,
                     row2,
                     HTML("&nbsp;"),
                     form_actions(save_label='Anular')
                     )
        )
        super(AnularProcoloAdmForm, self).__init__(
            *args, **kwargs)
Example #32
0
    def __init__(self, *args, **kwargs):

        row1 = crispy_layout_mixin.to_row(
            [('tipo', 12)])

        row2 = crispy_layout_mixin.to_row(
            [('numero', 6), ('ano', 6)])

        row3 = crispy_layout_mixin.to_row(
            [('periodo_inicial', 6), ('periodo_final', 6)])

        row4 = crispy_layout_mixin.to_row(
            [('publicacao_inicial', 6), ('publicacao_final', 6)])

        self.helper = FormHelper()
        self.helper.layout = Layout(
             Fieldset('Pesquisa Norma Juridica',
                      row1, row2, row3, row4),
             form_actions(save_label='Pesquisar')
        )
        super(NormaJuridicaPesquisaForm, self).__init__(*args, **kwargs)
Example #33
0
    def __init__(self, *args, **kwargs):
        super(MateriaLegislativaFilterSet, self).__init__(*args, **kwargs)

        self.filters['tipo'].label = 'Tipo de Matéria'
        self.filters['autoria__autor__tipo'].label = 'Tipo de Autor'
        self.filters['autoria__partido'].label = 'Partido do Autor'
        self.filters['relatoria__parlamentar_id'].label = 'Relatoria'

        row1 = crispy_layout_mixin.to_row([('tipo', 12)])
        row2 = crispy_layout_mixin.to_row([('numero', 4), ('ano', 4),
                                           ('numero_protocolo', 4)])
        row3 = crispy_layout_mixin.to_row([('data_apresentacao', 6),
                                           ('data_publicacao', 6)])
        row4 = crispy_layout_mixin.to_row([
            ('autoria__autor', 0),
            (Button('pesquisar',
                    'Pesquisar Autor',
                    css_class='btn btn-primary btn-sm'), 2),
            (Button('limpar',
                    'limpar Autor',
                    css_class='btn btn-primary btn-sm'), 10)
        ])
        row5 = crispy_layout_mixin.to_row([('autoria__autor__tipo', 6),
                                           ('autoria__partido', 6)])
        row6 = crispy_layout_mixin.to_row([('relatoria__parlamentar_id', 6),
                                           ('local_origem_externa', 6)])
        row7 = crispy_layout_mixin.to_row([
            ('tramitacao__unidade_tramitacao_destino', 6),
            ('tramitacao__status', 6)
        ])
        row8 = crispy_layout_mixin.to_row([('em_tramitacao', 6), ('o', 6)])
        row9 = crispy_layout_mixin.to_row([('ementa', 12)])

        self.form.helper = FormHelper()
        self.form.helper.form_method = 'GET'
        self.form.helper.layout = Layout(
            Fieldset(_('Pesquisa de Matéria'), row1, row2, row3,
                     HTML(sapl.utils.autor_label),
                     HTML(sapl.utils.autor_modal), row4, row5, row6, row7,
                     row8, row9, form_actions(save_label='Pesquisar')))
Example #34
0
    def __init__(self, *args, **kwargs):
        super(DocumentoAdministrativoFilterSet, self).__init__(*args, **kwargs)

        local_atual = 'tramitacaoadministrativo__unidade_tramitacao_destino'
        self.filters['tipo'].label = 'Tipo de Documento'
        self.filters['tramitacaoadministrativo__status'].label = 'Situação'
        self.filters[local_atual].label = 'Localização Atual'

        row1 = crispy_layout_mixin.to_row(
            [('tipo', 6),
             ('numero', 6)])

        row2 = crispy_layout_mixin.to_row(
            [('ano', 4),
             ('numero_protocolo', 4),
             ('data', 4)])

        row3 = crispy_layout_mixin.to_row(
            [('interessado', 4),
             ('assunto', 4),
             ('tramitacao', 4)])

        row4 = crispy_layout_mixin.to_row(
            [('tramitacaoadministrativo__unidade_tramitacao_destino', 6),
             ('tramitacaoadministrativo__status', 6)])

        row5 = crispy_layout_mixin.to_row(
            [('o', 12)])

        self.form.helper = FormHelper()
        self.form.helper.form_method = 'GET'
        self.form.helper.layout = Layout(
            Fieldset(_('Pesquisar Documento'),
                     row1, row2,
                     row3, row4, row5,
                     form_actions(save_label='Pesquisar'))
            )