shx-3d-render
parent
bed006d165
commit
8cb468b352
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue