fix(plugins): Add onchange handlers to existing custom feed inputs

- Add onchange handlers to key and value inputs for existing patternProperties fields
- Fixes bug where editing existing custom RSS feeds didn't save changes
- Ensures hidden JSON input field is updated when users edit feed entries
- Affects all plugins using patternProperties (custom_feeds, feed_logo_map, etc.)
This commit is contained in:
Chuck
2026-01-04 16:52:19 -05:00
parent 5241bbf89c
commit 6b81873024

View File

@@ -2506,13 +2506,15 @@ function generateFieldHtml(key, prop, value, prefix = '') {
value="${pairKey}"
placeholder="Key"
class="flex-1 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"
data-key-index="${index}">
data-key-index="${index}"
onchange="updateKeyValuePairData('${fieldId}', '${fullKey}')">
<input type="${valueType === 'string' ? 'text' : valueType === 'number' || valueType === 'integer' ? 'number' : 'text'}"
name="${fullKey}[value_${index}]"
value="${pairValue}"
placeholder="Value"
class="flex-1 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"
data-value-index="${index}">
data-value-index="${index}"
onchange="updateKeyValuePairData('${fieldId}', '${fullKey}')">
<button type="button"
onclick="removeKeyValuePair('${fieldId}', ${index})"
class="px-3 py-2 text-red-600 hover:text-red-800 hover:bg-red-50 rounded-md transition-colors"