Browse Source

1557 fix registro duplicado (#1564)

* Bloqueia ressubmissão de votação nominal (via JS)

* Fix #1563
pull/1569/head
Eliseu Egewarth 7 years ago
committed by Edward
parent
commit
97454480d3
  1. 2
      sapl/crispy_layout_mixin.py
  2. 5
      sapl/templates/sessao/votacao/nominal.html

2
sapl/crispy_layout_mixin.py

@ -38,7 +38,7 @@ def form_actions(more=[], save_label=_('Salvar')):
return FormActions( return FormActions(
Submit('salvar', save_label, css_class='pull-right', Submit('salvar', save_label, css_class='pull-right',
# para impedir resubmissão do form # para impedir resubmissão do form
onclick='this.disabled=true;'), onclick='this.form.submit();this.disabled=true;'),
*more) *more)

5
sapl/templates/sessao/votacao/nominal.html

@ -69,5 +69,10 @@
function voltar() { function voltar() {
window.history.back(); window.history.back();
} }
$(window).on('beforeunload', function () {
$("input[type=submit], input[type=button]").prop("disabled", "disabled");
});
</script> </script>
{% endblock extra_js%} {% endblock extra_js%}

Loading…
Cancel
Save