diff --git a/sapl/crispy_layout_mixin.py b/sapl/crispy_layout_mixin.py index c7421287a..06808e5c3 100644 --- a/sapl/crispy_layout_mixin.py +++ b/sapl/crispy_layout_mixin.py @@ -38,7 +38,7 @@ def form_actions(more=[], save_label=_('Salvar')): return FormActions( Submit('salvar', save_label, css_class='pull-right', # para impedir resubmissão do form - onclick='this.disabled=true;'), + onclick='this.form.submit();this.disabled=true;'), *more) diff --git a/sapl/templates/sessao/votacao/nominal.html b/sapl/templates/sessao/votacao/nominal.html index 838747999..ad494dae5 100644 --- a/sapl/templates/sessao/votacao/nominal.html +++ b/sapl/templates/sessao/votacao/nominal.html @@ -69,5 +69,10 @@ function voltar() { window.history.back(); } + + $(window).on('beforeunload', function () { + $("input[type=submit], input[type=button]").prop("disabled", "disabled"); + }); + {% endblock extra_js%}