Skip to content
Snippets Groups Projects
Commit e1ee8886 authored by Omar Ibrahim Arfa's avatar Omar Ibrahim Arfa
Browse files

fix radio button creation

parent ca5ca8af
No related branches found
No related tags found
No related merge requests found
...@@ -138,9 +138,8 @@ function buildInputs(pizzaNode, orderedArticleID, status) { ...@@ -138,9 +138,8 @@ function buildInputs(pizzaNode, orderedArticleID, status) {
]; ];
for (let value = 0; value < 5; value++) { for (let value = 0; value < 5; value++) {
let inputLabel = document.createElement("label"); let inputLabel = document.createElement("label");
pizzaNode.append(inputLabel);
let inputRadio = document.createElement("input"); let inputRadio = document.createElement("input");
inputLabel.append(inputRadio);
inputLabel.innerText = statusArray[value]; inputLabel.innerText = statusArray[value];
inputLabel.className = "pizzaRadioLabel"; inputLabel.className = "pizzaRadioLabel";
inputRadio.type = "radio"; inputRadio.type = "radio";
...@@ -151,5 +150,7 @@ function buildInputs(pizzaNode, orderedArticleID, status) { ...@@ -151,5 +150,7 @@ function buildInputs(pizzaNode, orderedArticleID, status) {
if (value === status) { if (value === status) {
inputRadio.checked = true; inputRadio.checked = true;
} }
inputLabel.prepend(inputRadio);
pizzaNode.append(inputLabel);
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment