public/js/js.js
/**
 * Dodaje pytanie wielokrotnego wyboru z pola checkbox
 */
Dodaje pytanie wielokrotnego wyboru z pola checkbox
Dodaje pytanie wielokrotnego wyboru z pola checkbox
function newCheckbox(){
    idOfQuestion++;
    questionDetails.push(0);
    document.getElementById("forma").innerHTML +=`
    <div xd="Check" 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 checkbox </label>
            <div id=unSelect >
        <label onclick="dodajOpcjeCheckbox(`+ idOfQuestion+`);">[dodaj opcje]</label>
        <label onclick="usunOpcjeCheckbox(`+ idOfQuestion+`);">[usun opcje]</label>
            </div>
            <div id="divOfQuestion`+idOfQuestion+`">
                <div class="custom-control custom-checkbox" id="Q`+idOfQuestion+`o`+questionDetails[idOfQuestion]+`">
					<input type="checkbox" class="custom-control-input" id="checkboxOption`+questionDetails[idOfQuestion] +`">
					<label class="custom-control-label" for="XcheckboxOption`+ questionDetails[idOfQuestion] +`" contenteditable="true">Opcja do wielokrotnego wyboru numer`+" "+questionDetails[idOfQuestion]+`</label>
                </div>
            </div>		
            <br>
    </div>        
    `;
}
function newCheckbox ( ) { idOfQuestion ++ ; questionDetails . push ( 0 ) ; document . getElementById ( "forma" ) . innerHTML += ` ` + idOfQuestion + ` ` + idOfQuestion + ` ` + idOfQuestion + ` ` + idOfQuestion + ` ` + idOfQuestion + ` ` + idOfQuestion + ` ` + idOfQuestion + ` ` + questionDetails [ idOfQuestion ] + ` ` + questionDetails [ idOfQuestion ] + ` ` + questionDetails [ idOfQuestion ] + ` ` + " " + questionDetails [ idOfQuestion ] + ` ` ; }
Dodaje pytanie wielokrotnego wyboru z pola checkbox
Dodaje pytanie wielokrotnego wyboru z pola checkbox
// var checkboxOption = 0; /* <label onclick="dodajOpcje(`+ checkboxOption +`,`+ idOfQuestion+`);">[dodaj opcje]</label> */