Skip to content

Commit

Permalink
Empécher de soumettre plusieurs fois le formulaire
Browse files Browse the repository at this point in the history
Pour l'envoi de message, ne se produit que sous Chrome.
  • Loading branch information
Anto59290 committed Feb 28, 2025
1 parent e9e7054 commit c326eb2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/static/core/message_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ document.addEventListener('DOMContentLoaded', function () {

document.getElementById("message-send-btn").addEventListener("click", event =>{
event.preventDefault()
event.target.disabled = true
const isDocumentBlockVisible = !document.querySelector(".document-form").classList.contains("fr-hidden")
const hasFile = !!document.getElementById('id_file').files[0]

Expand Down

0 comments on commit c326eb2

Please sign in to comment.