mailbox: add checkbox for pop3

This commit is contained in:
Girish Ramakrishnan
2021-10-08 10:20:17 -07:00
parent 355a4df65f
commit 0f4e71d478
4 changed files with 19 additions and 9 deletions

View File

@@ -387,6 +387,7 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
incomingDomains: [],
aliases: [],
active: true,
enablePop3: false,
addAlias: function (event) {
event.preventDefault();
@@ -407,6 +408,7 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
$scope.mailboxes.edit.owner = mailbox.owner; // this can be null if mailbox had no owner
$scope.mailboxes.edit.aliases = angular.copy(mailbox.aliases, []);
$scope.mailboxes.edit.active = mailbox.active;
$scope.mailboxes.edit.enablePop3 = mailbox.enablePop3;
$('#mailboxEditModal').modal('show');
},
@@ -414,8 +416,15 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
submit: function () {
$scope.mailboxes.edit.busy = true;
var data = {
ownerId: $scope.mailboxes.edit.owner.id,
ownerType: $scope.mailboxes.edit.owner.type,
active: $scope.mailboxes.edit.active,
enablePop3: $scope.mailboxes.edit.enablePop3
};
// $scope.mailboxes.edit.owner is expected to be validated by the UI
Client.updateMailbox($scope.domain.domain, $scope.mailboxes.edit.name, $scope.mailboxes.edit.owner.id, $scope.mailboxes.edit.owner.type, $scope.mailboxes.edit.active, function (error) {
Client.updateMailbox($scope.domain.domain, $scope.mailboxes.edit.name, data, function (error) {
if (error) {
$scope.mailboxes.edit.error = error;
$scope.mailboxes.edit.busy = false;