public/js/js.js
/**
 * Dodanie pytania typu jednokrotenego wyboru do generatora
 */
Dodanie pytania typu jednokrotenego wyboru do generatora
Dodanie pytania typu jednokrotenego wyboru do generatora
function newRadio(){
    idOfQuestion++;
    questionDetails.push(0);
    document.getElementById("forma").innerHTML +=`
    <div xd="Radio" id="EntireQuestionNo`+idOfQuestion+`">
    <button type="button" class="btn btn-danger deleteButton" onclick="deleteQuestion(`+idOfQuestion+`)">USUŃ TO PYTANIE</button>
        <label class="questionLabel"  id="questionLabel`+idOfQuestion +`" contenteditable="true" >Example question  </label>
            <div id=unSelect >
                <label onclick="dodajOpcjeRadio(`+ idOfQuestion+`);">[dodaj opcje]</label>\t
                <label onclick="usunOpcjeRadio(`+ idOfQuestion+`);">[usuń opcje]</label>
            </div>
			<div xdd='elo' id="divOfQuestion`+idOfQuestion+`">
				<div class="custom-control custom-radio" id="Q`+idOfQuestion+`o`+questionDetails[idOfQuestion]+`">
                  <input type="radio" class="custom-control-input" id="radioGroupOption`+ questionDetails[idOfQuestion] +`" name="groupOfRadiosFromQuestion`+idOfQuestion+`">
				  <label class="custom-control-label" for="XradioGroupOption`+ questionDetails[idOfQuestion] +`" contenteditable="true">Option`+" "+questionDetails[idOfQuestion]+`</label> 
				</div>
            </div>
            <br>
    </div>
    `;
}
function newRadio ( ) { idOfQuestion ++ ; questionDetails . push ( 0 ) ; document . getElementById ( "forma" ) . innerHTML += ` ` + idOfQuestion + ` ` + idOfQuestion + ` ` + idOfQuestion + ` ` + idOfQuestion + ` \t ` + idOfQuestion + ` ` + idOfQuestion + ` ` + idOfQuestion + ` ` + questionDetails [ idOfQuestion ] + ` ` + questionDetails [ idOfQuestion ] + ` ` + idOfQuestion + ` ` + questionDetails [ idOfQuestion ] + ` ` + " " + questionDetails [ idOfQuestion ] + ` ` ; }
Dodanie pytania typu jednokrotenego wyboru do generatora
Dodanie pytania typu jednokrotenego wyboru do generatora
// var radioOption = 0; // <input type="radio" class="custom-control-input" id="radioGroupToQuestion`+idOfQuestion+`" name="groupOfDefaultRadios"> //######################## for w label nie używane  // potrzebne dopiero przy wyświetlaniu wygenerowanej ankiety 