mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
to avoid CSRF error due to multiple click
If the network is terrible, the user clicks rapidly and many times, it will show a CSRF error because the last time click had the wrong CSRF token.
This commit is contained in:
@@ -40,6 +40,9 @@
|
||||
{% block extra_js %}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("form").submit(function(){
|
||||
$(":submit",this).attr("disabled","disabled");
|
||||
});
|
||||
$('#id_username').focus();
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user