diff --git a/back/pialert.py b/back/pialert.py index 9767a7b6..df256da0 100755 --- a/back/pialert.py +++ b/back/pialert.py @@ -3594,7 +3594,7 @@ def get_form_control(setting): if type in ['WATCH']: return 'multiselect' if type in ['LIST']: - return 'text' + return 'list' return 'text' diff --git a/front/php/server/util.php b/front/php/server/util.php index 4a14e435..fdd4f0e5 100755 --- a/front/php/server/util.php +++ b/front/php/server/util.php @@ -289,7 +289,7 @@ function saveSettings() $val = "True"; } $txt = $txt.$setting[1]."=".$val."\n" ; - }elseif($setting[2] == 'multiselect' or $setting[2] == 'subnets') + }elseif($setting[2] == 'multiselect' or $setting[2] == 'subnets' or $setting[2] == 'list') { $temp = '['; foreach($setting[3] as $val) diff --git a/front/settings.php b/front/settings.php index 5ebcdb4b..418ca92e 100755 --- a/front/settings.php +++ b/front/settings.php @@ -26,11 +26,12 @@ $settingsJson = json_decode($data); // get settings from the DB global $db; +global $settingKeyOfLists; $result = $db->query("SELECT * FROM Settings"); // array -$lists = array(); +$settingKeyOfLists = array(); $settings = array(); while ($row = $result -> fetchArray (SQLITE3_ASSOC)) { // Push row data @@ -238,12 +239,12 @@ while ($row = $result -> fetchArray (SQLITE3_ASSOC)) { elseif ($set['Type'] == 'list') { - $lists[] = array($set['Code_Name']); + $settingKeyOfLists[] = $set['Code_Name']; $input = $input. '