Skip to content

Commit

Permalink
Merge pull request #30 from NethServer/fixTimezone
Browse files Browse the repository at this point in the history
Update timezone handling in WebTop NethServer/dev#6826
  • Loading branch information
stephdl authored Jan 15, 2024
2 parents c11d9a2 + a0ea91b commit 148cf1a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion imageroot/actions/create-module/10env
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import agent

agent.set_env('WEBTOP_TIMEZONE', 'Etc/UTC')
agent.set_env('WEBTOP_TIMEZONE', '-')
agent.set_env('WEBTOP_LOCALE', 'en_US')
agent.set_env('WEBTOP_REQUEST_HTTPS_CERTIFICATE', 'False')
agent.set_env('WEBDAV_DEBUG', 'False')
Expand Down
2 changes: 1 addition & 1 deletion ui/public/i18n/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"default_locale_for_webtop_users": "Default locale for WebTop users",
"timezone":"Default timezone",
"default_timezone_for_webtop_users": "Default timezone for WebTop users",
"choose_timezone": "Choose the timezone for WebTop users",
"choose_timezone": "Start to type the timezone name, e.g. Europe/Rome",
"webapp_debug": "Debug mode for WebTop",
"min_webapp_memory":"Minimum memory for WebTop",
"max_webapp_memory": "Maximum memory for WebTop",
Expand Down
12 changes: 10 additions & 2 deletions ui/src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ export default {
mail_module: "",
ejabberd_module: "",
locale: "",
timezone: "",
accepted_timezone_list: "",
limit_min: "",
limit_max: "",
webapp: {
Expand Down Expand Up @@ -599,7 +599,7 @@ export default {
} else {
this.ejabberd_module = "-";
}
this.timezone = config.timezone;
this.timezone = config.timezone === '-' ? '' : config.timezone;
});
this.loading.getConfiguration = false;
this.focusElement("hostname");
Expand All @@ -624,6 +624,14 @@ export default {
}
isValidationOk = false;
}
if (!this.timezone) {
this.error.accepted_timezone_list = "common.required";

if (isValidationOk) {
this.focusElement("accepted_timezone_list");
}
isValidationOk = false;
}

if (parseInt(this.webapp.min_memory) > parseInt(this.webapp.max_memory)) {
this.error.limit_min = "error.choose_min_webapp_memory_MB";
Expand Down

0 comments on commit 148cf1a

Please sign in to comment.