1// per bloccare il doppio click nei form, basta aggiungere la classe "double-call-block" nel kind: Submit (tipicamente btnNext) nel template desiderato 2// vedi tplCertificazioni.html come esempio. 3 4let btnCollectionToDisable = document.getElementsByClassName('double-call-block'); //restituisce un HTMLCollection diverso da Array 5// console.log(btnCollectionToDisable); 6 7// essendoci situazioni in cui ho più pulsanti che effettuano submit della form devo creare un eventListener per ciascuno 8// vedi fornitori anagrafica o prodotto 9Array.from(btnCollectionToDisable).forEach(btnToDisable => { 10 11 btnToDisable.addEventListener('click', (event) =>{ 12 btnToDisable.classList.add("grey-button"); 13 btnToDisable.classList.remove("red-button"); 14 15 if (btnToDisable.getAttribute("data-clicked") === "true") { 16 // Il pulsante è stato già cliccato 17 event.preventDefault(); // Impedisce l'invio del form 18 return; 19 } 20 21 btnToDisable.setAttribute("data-clicked", "true"); 22 }); 23});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.