Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions web_interface/static/v3/plugins_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -3164,8 +3164,7 @@ function generateFieldHtml(key, prop, value, prefix = '') {
data-file-type="${fileType}">
</div>
`;
}
} else if (xWidgetValue === 'checkbox-group' || xWidgetValue2 === 'checkbox-group') {
} else if (xWidgetValue === 'checkbox-group' || xWidgetValue2 === 'checkbox-group') {
// Checkbox group widget for multi-select arrays with enum items
// Use _data hidden input pattern to serialize selected values correctly
console.log(`[DEBUG] ✅ Detected checkbox-group widget for ${fullKey} - rendering checkboxes`);
Expand Down Expand Up @@ -3201,7 +3200,7 @@ function generateFieldHtml(key, prop, value, prefix = '') {
// Sentinel hidden input with bracket notation to allow clearing array to [] when all unchecked
// This ensures the field is always submitted, even when all checkboxes are unchecked
html += `<input type="hidden" name="${fullKey}[]" value="">`;
} else if (xWidgetValue === 'custom-feeds' || xWidgetValue2 === 'custom-feeds') {
} else if (xWidgetValue === 'custom-feeds' || xWidgetValue2 === 'custom-feeds') {
// Custom feeds widget - check schema validation first
const itemsSchema = prop.items || {};
const itemProperties = itemsSchema.properties || {};
Expand Down Expand Up @@ -3238,7 +3237,7 @@ function generateFieldHtml(key, prop, value, prefix = '') {
<p class="text-sm text-gray-600 mt-1">Enter values separated by commas (custom feeds table rendered server-side)</p>
`;
}
} else {
} else {
// Regular array input (comma-separated)
console.log(`[DEBUG] ❌ No special widget detected for ${fullKey}, using regular array input`);
// Handle null/undefined values - use default if available
Expand All @@ -3254,6 +3253,7 @@ function generateFieldHtml(key, prop, value, prefix = '') {
<input type="text" id="${fullKey}" name="${fullKey}" value="${arrayValue}" placeholder="Enter values separated by commas" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm bg-white text-black placeholder:text-gray-500">
<p class="text-sm text-gray-600 mt-1">Enter values separated by commas</p>
`;
}
}
} else if (prop.enum) {
html += `<select id="${fullKey}" name="${fullKey}" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm bg-white text-black">`;
Expand Down
2 changes: 1 addition & 1 deletion web_interface/templates/v3/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -4920,7 +4920,7 @@ <h4 class="font-medium ${colors.text} mb-1">
<script src="{{ url_for('static', filename='v3/js/widgets/plugin-loader.js') }}" defer></script>

<!-- Legacy plugins_manager.js (for backward compatibility during migration) -->
<script src="{{ url_for('static', filename='v3/plugins_manager.js') }}?v=20250104i" defer></script>
<script src="{{ url_for('static', filename='v3/plugins_manager.js') }}?v=20250116a" defer></script>

<!-- Custom feeds table helper functions -->
<script>
Expand Down