Updates visibility of conditional fields based on 'Use as Search Engine' checkbox
(isChecked)
| 141 | |
| 142 | /** Updates visibility of conditional fields based on 'Use as Search Engine' checkbox */ |
| 143 | function updateFieldVisibility(isChecked) { |
| 144 | if (searchEngineFieldsDiv) { |
| 145 | searchEngineFieldsDiv.style.display = isChecked ? "block" : "none"; |
| 146 | } |
| 147 | if (matchPatternsFieldsDiv) { |
| 148 | matchPatternsFieldsDiv.style.display = isChecked ? "none" : "block"; |
| 149 | } |
| 150 | if (baseUrlInput) { |
| 151 | if (isChecked) { |
| 152 | baseUrlInput.setAttribute("required", ""); |
| 153 | } else { |
| 154 | baseUrlInput.removeAttribute("required"); |
| 155 | } |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | // --- Load Data For Editing --- |
| 160 | async function loadConfigForEditing() { |
no outgoing calls
no test coverage detected