mail from validation: add busy indicator
This commit is contained in:
@@ -184,11 +184,25 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
}
|
||||
};
|
||||
|
||||
$scope.toggleMailFromValidation = function () {
|
||||
Client.setMailFromValidation($scope.domain.domain, !$scope.domain.mailConfig.mailFromValidation, function (error) {
|
||||
if (error) return console.error(error);
|
||||
$scope.refreshDomain();
|
||||
});
|
||||
$scope.mailFromValidation = {
|
||||
busy: false,
|
||||
|
||||
submit: function () {
|
||||
$scope.mailFromValidation.busy = true;
|
||||
|
||||
Client.setMailFromValidation($scope.domain.domain, !$scope.domain.mailConfig.mailFromValidation, function (error) {
|
||||
if (error) {
|
||||
$scope.mailFromValidation.busy = false;
|
||||
return console.error(error);
|
||||
}
|
||||
|
||||
// give sometime for the mail container to restart
|
||||
$timeout(function () {
|
||||
$scope.mailFromValidation.busy = false;
|
||||
$scope.refreshDomain();
|
||||
}, 5000);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.incomingEmail = {
|
||||
|
||||
Reference in New Issue
Block a user