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:
QIN LEI
2023-10-06 15:20:20 +08:00
committed by GitHub
parent 46a5242782
commit 305b080259
@@ -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>