()
| 20270 | </label> |
| 20271 | <select name="${key}" class="w-full px-4 py-2 rounded-lg bg-slate-700 border border-slate-600 focus:border-Ragnar-500 focus:ring-1 focus:ring-Ragnar-500"> |
| 20272 | ${selectOptions.map(option => `<option value="${option.value}" ${option.value === String(selectedValue) ? 'selected' : ''}>${option.label}</option>`).join('')} |
| 20273 | </select> |
| 20274 | </div> |
| 20275 | `; |
| 20276 | } else if (type === 'checkbox') { |
| 20277 | // Determine if this checkbox should be disabled based on dependencies |
| 20278 | const disabledAttr = (key === 'scan_vuln_no_ports' && !config.scan_vuln_running) ? 'disabled' : ''; |
| 20279 | const disabledClass = disabledAttr ? 'opacity-50 cursor-not-allowed' : ''; |
| 20280 | |
| 20281 | const handlerAttr = checkboxHandlers[key] ? `onchange="${checkboxHandlers[key]}"` : ''; |
| 20282 | html += ` |
| 20283 | <label class="flex items-center space-x-3 p-3 rounded-lg hover:bg-slate-700 hover:bg-opacity-50 transition-colors cursor-pointer ${disabledClass}"> |
| 20284 | <input type="checkbox" name="${key}" ${value ? 'checked' : ''} ${disabledAttr} |
| 20285 | class="w-5 h-5 rounded bg-slate-700 border-slate-600 text-Ragnar-500 focus:ring-Ragnar-500" |
| 20286 | ${handlerAttr}> |
| 20287 | <span class="flex items-center gap-2"> |
| 20288 | ${label} |
| 20289 | <span class="info-icon" tabindex="0" role="button" aria-label="${description}" data-tooltip="${description}">ⓘ</span> |
| 20290 | </span> |
| 20291 | </label> |
| 20292 | `; |
| 20293 | } else if (key === 'gc9a01_mascot_color') { |
| 20294 | const colorVal = (value && typeof value === 'string' && value.startsWith('#')) ? value : '#96C8FF'; |
| 20295 | html += ` |
| 20296 | <div class="space-y-2" id="cfg-gc9a01-color-row"> |
nothing calls this directly
no test coverage detected