diff --git a/.gemini/skills/plugin-development/plugin-skill.md b/.gemini/skills/plugin-development/plugin-skill.md new file mode 100644 index 00000000..215d9bf2 --- /dev/null +++ b/.gemini/skills/plugin-development/plugin-skill.md @@ -0,0 +1,16 @@ +# Plugin development skill + +1. Assess requirements +2. Read `docs/PLUGINS_DEV.md` +3. Confirm field mapping +4. Ask clarifying questions +5. code placed in `front/plugins/` + + +Plugin prefix: + +- has to be uppercase letters only (no underscores) +- must be unique +- keep short but readable if possible + + diff --git a/front/css/app.css b/front/css/app.css index 4a5b39fa..333da974 100755 --- a/front/css/app.css +++ b/front/css/app.css @@ -1846,6 +1846,13 @@ textarea[readonly], display: grid; } +@media (min-width: 768px) { + .modal-dialog { + width: 750px; + margin: 30px auto; + } +} + /* ----------------------------------------------------------------- */ /* NETWORK page */ /* ----------------------------------------------------------------- */ diff --git a/front/js/modal.js b/front/js/modal.js index 0c4ec1fb..b5d6113c 100755 --- a/front/js/modal.js +++ b/front/js/modal.js @@ -208,7 +208,12 @@ function showModalPopupForm( } } - const fieldOptionsOverride = field.type?.elements[0]?.elementOptions || []; + // For select elements use field.options (the selectable values); for all other + // element types fall back to elementOptions (used for input attributes like placeholder). + const elementType = field.type?.elements[0]?.elementType; + const fieldOptionsOverride = (elementType === 'select' && field.options?.length) + ? field.options + : (field.type?.elements[0]?.elementOptions || []); const setValue = initialValue; const setType = JSON.stringify(field.type); const setEvents = field.events || []; // default to empty array if missing diff --git a/front/js/settings_utils.js b/front/js/settings_utils.js index ec6d00bc..6cb01e62 100755 --- a/front/js/settings_utils.js +++ b/front/js/settings_utils.js @@ -1175,6 +1175,7 @@ function generateFormHtml(settingsData, set, overrideValue, overrideOptions, ori // Parse the setType JSON string // console.log(processQuotes(setType)); + console.log(setType); const setTypeObject = JSON.parse(processQuotes(setType)) const dataType = setTypeObject.dataType; diff --git a/front/php/templates/modals.php b/front/php/templates/modals.php index f7432290..f142d2de 100755 --- a/front/php/templates/modals.php +++ b/front/php/templates/modals.php @@ -129,7 +129,7 @@ - +