Now enforce SOGoMailCustomFromEnabled

This commit is contained in:
Ludovic Marcotte
2015-06-12 11:41:24 -04:00
committed by Francis Lachapelle
parent bb1977fa93
commit 10a017503e
3 changed files with 19 additions and 8 deletions
+9 -2
View File
@@ -114,7 +114,8 @@
templateUrl: 'editAccount?account=' + index,
targetEvent: null,
locals: { account: account,
accountId: index}
accountId: index,
mailCustomFromEnabled: window.mailCustomFromEnabled}
}).then(function() {
$scope.preferences.defaults.AuxiliaryMailAccounts[index] = account;
});
@@ -245,9 +246,15 @@
};
}
function AccountDialogCtrl($scope, $mdDialog, account, accountId) {
function AccountDialogCtrl($scope, $mdDialog, account, accountId, mailCustomFromEnabled) {
$scope.account = account;
$scope.accountId = accountId;
$scope.customFromIsReadonly = function() {
if (accountId > 0)
return false;
return !mailCustomFromEnabled;
};
$scope.cancel = function() {
$mdDialog.cancel();
};