Make time_zone a select list due to PEBKAC #1417 #1426

This commit is contained in:
the-djmaze 2024-02-11 04:10:30 +01:00
parent e1a51ba69c
commit bb906e61ab
3 changed files with 8 additions and 2 deletions

View file

@ -34,7 +34,8 @@ export class AdminSettingsConfig /*extends AbstractViewSettings*/ {
name: skey,
value: item[0],
type: getInputType(item[0], skey.includes('password')),
comment: item[1]
comment: item[1],
options: item[2]
});
});
cfg.push(section);

View file

@ -23,6 +23,8 @@ class ActionsAdmin extends Actions
{
$aConfig = $this->Config()->jsonSerialize();
unset($aConfig['version']);
$aConfig['logs']['time_zone'][1] = '';
$aConfig['logs']['time_zone'][2] = \DateTimeZone::listIdentifiers();
return $this->DefaultResponse($aConfig);
}

View file

@ -11,7 +11,10 @@
<!-- ko if: 'checkbox' == type -->
<input type="checkbox" data-bind="attr: {name: key, checked: value}">
<!-- /ko -->
<!-- ko if: 'checkbox' != type -->
<!-- ko if: options -->
<select data-bind="attr: {name: key}, options: options, value: value"></select>
<!-- /ko -->
<!-- ko if: 'checkbox' != type && !options -->
<input data-bind="attr: {name: key, type: type}, value: value" autocorrect="off">
<!-- /ko -->
<em data-bind="text: comment, visible: comment"></em>