diff --git a/front/php/server/util.php b/front/php/server/util.php
index 5d2c840c..ee9fbaa4 100755
--- a/front/php/server/util.php
+++ b/front/php/server/util.php
@@ -342,7 +342,7 @@ function saveSettings()
}
$txt .= $settingKey . "=" . $val . "\n";
- } elseif ($settingType == 'text.multiselect' || $settingType == 'subnets' || $settingType == 'list') {
+ } elseif ($settingType == 'text.multiselect' || $settingType == 'subnets' || $settingType == 'list' || $settingType == 'list.select') {
$temp = '';
if(is_array($settingValue) == FALSE)
diff --git a/front/plugins/README.md b/front/plugins/README.md
index 9dc14e7f..887c7281 100755
--- a/front/plugins/README.md
+++ b/front/plugins/README.md
@@ -559,6 +559,7 @@ Required attributes are:
| | - `text.select` |
| | - `text.multiselect` |
| | - `list` |
+| | - `list.select` |
| | - `integer.checkbox` |
| | - `text.template` |
| `"localized"` | A list of properties on the current JSON level that need to be localized. |
@@ -647,7 +648,7 @@ The UI will adjust how columns are displayed in the UI based on the resolvers de
| See below for information on `threshold`, `replace`. | |
| | |
| `options` Property | Used in conjunction with types like `threshold`, `replace`, `regex`. |
-| `options_params` Property | Used in conjunction with a `"options": "[{value}]"` template and `text.select`. Can specify SQL query (needs to return 2 columns `SELECT dev_Name as name, dev_Mac as id`) or Setting (not tested) to populate the dropdown. Check example below or have a look at the `NEWDEV` plugin `config.json` file. |
+| `options_params` Property | Used in conjunction with a `"options": "[{value}]"` template and `text.select`/`list.select`. Can specify SQL query (needs to return 2 columns `SELECT dev_Name as name, dev_Mac as id`) or Setting (not tested) to populate the dropdown. Check example below or have a look at the `NEWDEV` plugin `config.json` file. |
| `threshold` | The `options` array contains objects ordered from the lowest `maximum` to the highest. The corresponding `hexColor` is used for the value background color if it's less than the specified `maximum` but more than the previous one in the `options` array. |
| `replace` | The `options` array contains objects with an `equals` property, which is compared to the "value." If the values are the same, the string in `replacement` is displayed in the UI instead of the actual "value". |
| `regex` | Applies a regex to the value. The `options` array contains objects with an `type` (must be set to `regex`) and `param` (must contain the regex itself) property. |
diff --git a/front/settings.php b/front/settings.php
index 689d4bd8..680f1dc3 100755
--- a/front/settings.php
+++ b/front/settings.php
@@ -416,7 +416,7 @@ while ($row = $result -> fetchArray (SQLITE3_ASSOC)) {
let inputHtml = "";
if (setType.startsWith('text') || setType.startsWith('string') || setType.startsWith('date-time') ) {
-
+ // --- process text ---
if(setType.includes(".select"))
{
inputHtml = generateInputOptions(pluginsData, set, inputHtml, isMultiSelect = false)
@@ -435,12 +435,16 @@ while ($row = $result -> fetchArray (SQLITE3_ASSOC)) {
inputHtml = ``;
}
} else if (setType === 'integer') {
+ // --- process integer ---
inputHtml = ``;
} else if (setType.startsWith('password')) {
+ // --- process password ---
inputHtml = ``;
} else if (setType === 'readonly') {
+ // --- process readonly ---
inputHtml = ``;
} else if (setType === 'boolean' || setType === 'integer.checkbox') {
+ // --- process boolean ---
let checked = val === 'True' || val === '1' ? 'checked' : '';
// if it's overridable set readonly accordingly
@@ -455,6 +459,7 @@ while ($row = $result -> fetchArray (SQLITE3_ASSOC)) {
inputHtml = generateInputOptions(pluginsData, set, inputHtml)
} else if (setType === 'subnets') {
+ // --- process subnets ---
inputHtml = `