Skip to content

Commit

Permalink
Fix default mail server URL when empty
Browse files Browse the repository at this point in the history
  • Loading branch information
stephdl committed Feb 6, 2024
1 parent ff69c40 commit 3e3ebe2
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions ui/src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -365,17 +365,19 @@ export default {
this.mail_server = "";
}
this.ldap_domain = config.ldap_domain;
// if mail_server_URL is empty, set default value
if (this.mail_server_URL.length === 0) {
this.mail_server_URL.push({
label: this.$t("settings.no_available_mail_domain_check_users"),
value: "",
name: ""
});
// we want to avoid to save the form, there is no users set in the mail domain
this.mail_server = "";
}
});

this.mail_server_URL = config.mail_server_URL;
// if mail_server_URL is empty, set default value
if (this.mail_server_URL.length === 0) {
this.mail_server_URL.push({
label: this.$t("settings.no_available_mail_domain_check_users"),
value: "",
name: ""
});
}
this.user_domains_list = config.user_domains_list;
this.loading.getConfiguration = false;
this.focusElement("host");
Expand Down

0 comments on commit 3e3ebe2

Please sign in to comment.