shx-3d-render

main
Jan Umbach 2024-06-21 19:57:46 +02:00
parent 72ec2e5619
commit fc0617f8e2
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) { function SHX_IFC_genColorSelect(inputID, labelText, inputName, inputVal, options, section_id) {
let html = ` let html = `
<label class="form__label custom shx-ifc-form_label" for="${inputID}-label">${labelText}</label> <label class="form__label custom shx-ifc-form_label" for="${inputID}-label">${labelText}</label>
<section id="${inputID}" class="shx-ifc-colorselect" form="product-form-${section_id}" name="properties[${inputName}]"> <div id="${inputID}" class="shx-ifc-colorselect">
`; `;
for(let i = 0; i < options.length; i++) { for(let i = 0; i < options.length; i++) {
html += ` html += `
<input type="radio" id="${inputID}-${i}" form="product-form-${section_id}" name="${inputName}" value="${options[i]}" ${inputVal === options[i] ? 'checked' : ''}> <input type="radio" id="${inputID}-${i}" form="product-form-${section_id}" name="properties[${inputName}]" value="${options[i]}" ${inputVal === options[i] ? 'checked' : ''}>
<label for="${inputID}-${i}" style="background-color: ${options[i]};"></label> <label for="${inputID}-${i}" style="background-color: ${options[i]};"></label>
`; `;
} }
html += `</section>`; html += `</div>`;
return html; return html;
} }