Skip to content

Commit

Permalink
Make time_zone a select list due to PEBKAC the-djmaze#1417 the-djmaze…
Browse files Browse the repository at this point in the history
  • Loading branch information
the-djmaze committed Feb 11, 2024
1 parent e1a51ba commit bb906e6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dev/Settings/Admin/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions snappymail/v/0.0.0/app/libraries/RainLoop/ActionsAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public function DoAdminSettingsGet() : array
{
$aConfig = $this->Config()->jsonSerialize();
unset($aConfig['version']);
$aConfig['logs']['time_zone'][1] = '';
$aConfig['logs']['time_zone'][2] = \DateTimeZone::listIdentifiers();
return $this->DefaultResponse($aConfig);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit bb906e6

Please sign in to comment.