mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-13 14:03:00 +00:00
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:
@@ -2506,13 +2506,15 @@ function generateFieldHtml(key, prop, value, prefix = '') {
|
|||||||
value="${pairKey}"
|
value="${pairKey}"
|
||||||
placeholder="Key"
|
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"
|
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'}"
|
<input type="${valueType === 'string' ? 'text' : valueType === 'number' || valueType === 'integer' ? 'number' : 'text'}"
|
||||||
name="${fullKey}[value_${index}]"
|
name="${fullKey}[value_${index}]"
|
||||||
value="${pairValue}"
|
value="${pairValue}"
|
||||||
placeholder="Value"
|
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"
|
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"
|
<button type="button"
|
||||||
onclick="removeKeyValuePair('${fieldId}', ${index})"
|
onclick="removeKeyValuePair('${fieldId}', ${index})"
|
||||||
class="px-3 py-2 text-red-600 hover:text-red-800 hover:bg-red-50 rounded-md transition-colors"
|
class="px-3 py-2 text-red-600 hover:text-red-800 hover:bg-red-50 rounded-md transition-colors"
|
||||||
|
|||||||
Reference in New Issue
Block a user