1/* -- GESTION CRITERES MOTEUR -- */ 2let customRadio = document.querySelectorAll(".u-form-radio-perso__choix"); 3//console.log(customRadio); 4if(customRadio){ 5 6 for (let i=0; i<customRadio.length; i++){ 7 customRadio[i].addEventListener("click", function (e) { 8 e.preventDefault(); 9 var inputRef = this.querySelector("input"); 10 if (inputRef.name == 'profil') { 11 var raisonSociale = qs('#raison-sociale'); 12 raisonSociale.removeAttribute('required'); 13 qs('.u-form-raison').classList.add('hide'); 14 } 15 if(!this.classList.contains("u-form-radio-perso__choix--on")){ 16 cleanActive(this.parentNode); 17 this.classList.add("u-form-radio-perso__choix--on"); 18 inputRef.checked = true; 19 if (inputRef.name == 'profil' && inputRef.value == 'professionnel'){ 20 qs('.u-form-raison').classList.remove('hide'); 21 raisonSociale.setAttribute('required','required'); 22 } 23 }else{ 24 this.classList.remove("u-form-radio-perso__choix--on"); 25 inputRef.checked = false; 26 27 } 28 }); 29 } 30 31 function cleanActive(targetParent){ 32 for (let i=0; i<customRadio.length; i++) { 33 //console.log(customRadio[i]); 34 if(customRadio[i].parentNode === targetParent) 35 customRadio[i].classList.remove("u-form-radio-perso__choix--on"); 36 } 37 } 38 39} 40/* ##################################################### */
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.