Bring back email view in app configure

This commit is contained in:
Johannes Zellner
2019-09-17 15:09:39 +02:00
parent 8810439ffc
commit 5c0a53e02a
3 changed files with 23 additions and 17 deletions

View File

@@ -356,14 +356,23 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
},
submit: function () {
$scope.email.error = {};
$scope.email.busy = true;
// TODO
Client.configureApp($scope.app.id, 'mailbox', { mailboxName: $scope.email.mailboxNameEnabled ? $scope.email.mailboxName : null }, function (error) {
if (error && error.statusCode === 400) {
$scope.email.busy = false;
$scope.email.error.mailboxName = error.message;
$scope.emailForm.$setPristine();
return;
}
if (error) return Client.error(error);
$scope.email.success = true;
$scope.email.busy = false;
$scope.email.success = true;
$scope.email.busy = false;
trackAppTask();
trackAppTask();
});
}
};