Browse Source

Ajusta código para manter compatib c python 3.4.3 (#754)

pull/760/head
Leandro Roberto da Silva 8 years ago
committed by GitHub
parent
commit
575914bedf
  1. 2
      .travis.yml
  2. 19
      sapl/materia/forms.py

2
.travis.yml

@ -1,7 +1,7 @@
language: python language: python
python: python:
- 3.5.2 - 3.4.3
services: services:
- postgresql - postgresql

19
sapl/materia/forms.py

@ -1098,20 +1098,19 @@ class ConfirmarProposicaoForm(ProposicaoForm):
css_class="ementa_materia hidden alert-info", css_class="ementa_materia hidden alert-info",
dismiss=False), 12)))) dismiss=False), 12))))
submit_incorporar = Submit('incorporar', _('Incorporar')) itens_incorporacao = [to_column(('regime_tramitacao', 4))]
itens_incorporacao = ['regime_tramitacao']
if self.proposicao_incorporacao_obrigatoria == 'C': if self.proposicao_incorporacao_obrigatoria == 'C':
itens_incorporacao.append(InlineRadios('gerar_protocolo')) itens_incorporacao.append(to_column((InlineRadios(
'gerar_protocolo'), 4)))
if self.proposicao_incorporacao_obrigatoria != 'N': if self.proposicao_incorporacao_obrigatoria != 'N':
itens_incorporacao.append('numero_de_paginas') itens_incorporacao.append(to_column(('numero_de_paginas', 4)))
itens_incorporacao.append(FormActions(Submit(
'incorporar', _('Incorporar'), css_class='pull-right')))
fields.append( fields.append(
Fieldset( Fieldset(_('Registro de Incorporação'), *itens_incorporacao))
_('Registro de Incorporação'),
*[to_column((itens, 4)) for itens in itens_incorporacao],
FormActions(submit_incorporar, css_class='pull-right')
))
fields.append( fields.append(
Fieldset( Fieldset(
@ -1119,7 +1118,7 @@ class ConfirmarProposicaoForm(ProposicaoForm):
'justificativa_devolucao', 'justificativa_devolucao',
FormActions(Submit( FormActions(Submit(
'devolver', _('Devolver'), 'devolver', _('Devolver'),
css_class='btn-danger'), css_class='pull-right') css_class='btn-danger pull-right'))
)) ))
self.helper = FormHelper() self.helper = FormHelper()
self.helper.layout = Layout(*fields) self.helper.layout = Layout(*fields)

Loading…
Cancel
Save