shx-3d-render

main
Jan Umbach 2024-06-21 19:45:37 +02:00
parent bed006d165
commit 8cb468b352
1 changed files with 3 additions and 3 deletions

View File

@ -142,17 +142,17 @@
function SHX_IFC_genColorSelect(inputID, labelText, inputName, inputVal, options, section_id) {
let html = `
<label class="form__label custom shx-ifc-form_label" for="${inputID}-label">${labelText}</label>
<section id="${inputID}" form="product-form-${section_id}" name="properties[${inputName}]" class="shx-ifc-colorselect">
<div id="${inputID}" class="shx-ifc-colorselect">
`;
for(let i = 0; i < options.length; i++) {
html += `
<input type="radio" id="${inputID}-${i}" name="${inputName}" value="${options[i]}" ${inputVal === options[i] ? 'checked' : ''}>
<input type="radio" id="${inputID}-${i}" form="product-form-${section_id}" name="${inputName}" value="${options[i]}" ${inputVal === options[i] ? 'checked' : ''}>
<label for="${inputID}-${i}" style="background-color: ${options[i]};"></label>
`;
}
html += `</section>`;
html += `</div>`;
return html;
}