Browse Source

Fixes #1628

pull/1642/head 3.1.39-BETA
Edward Ribeiro 7 years ago
parent
commit
fff13710af
  1. 10
      sapl/crispy_layout_mixin.py
  2. 4
      sapl/materia/forms.py

10
sapl/crispy_layout_mixin.py

@ -35,11 +35,17 @@ def to_fieldsets(fields):
def form_actions(more=[],
label=_('Salvar'), name='salvar', css_class='pull-right'):
label=_('Salvar'), name='salvar', css_class='pull-right', disabled=True):
if disabled:
doubleclick = 'this.form.submit();this.disabled=true;'
else:
doubleclick = 'return true;'
return FormActions(
Submit(name, label, css_class=css_class,
# para impedir resubmissão do form
onclick='this.form.submit();this.disabled=true;'),
onclick=doubleclick),
*more)

4
sapl/materia/forms.py

@ -1306,7 +1306,8 @@ class ConfirmarProposicaoForm(ProposicaoForm):
itens_incorporacao.append(
to_column(
(form_actions(label=_('Incorporar'),
name='incorporar'), 12)
name='incorporar',
disabled=False), 12)
)
)
@ -1320,6 +1321,7 @@ class ConfirmarProposicaoForm(ProposicaoForm):
to_column(
(form_actions(label=_('Devolver'),
name='devolver',
disabled=False,
css_class='btn-danger pull-right'), 12)
)
)

Loading…
Cancel
Save