mail list: add members only checkbox
This commit is contained in:
@@ -67,6 +67,7 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
error: {},
|
||||
name: '',
|
||||
membersTxt: '',
|
||||
membersOnly: false,
|
||||
|
||||
reset: function () {
|
||||
$scope.mailinglists.add.busy = false;
|
||||
@@ -88,7 +89,7 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
.map(function (m) { return m.trim(); })
|
||||
.filter(function (m) { return m.length !== 0; });
|
||||
|
||||
Client.addMailingList($scope.domain.domain, $scope.mailinglists.add.name, members, function (error) {
|
||||
Client.addMailingList($scope.domain.domain, $scope.mailinglists.add.name, members, $scope.mailinglists.add.membersOnly, function (error) {
|
||||
$scope.mailinglists.add.busy = false;
|
||||
$scope.mailinglists.add.error = {};
|
||||
|
||||
@@ -114,10 +115,12 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
error: {},
|
||||
name: '',
|
||||
membersTxt: '',
|
||||
membersOnly: false,
|
||||
|
||||
show: function (list) {
|
||||
$scope.mailinglists.edit.name = list.name;
|
||||
$scope.mailinglists.edit.membersTxt = list.members.sort().join('\n');
|
||||
$scope.mailinglists.edit.membersOnly = list.membersOnly;
|
||||
|
||||
$('#mailinglistEditModal').modal('show');
|
||||
},
|
||||
@@ -129,7 +132,7 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
.map(function (m) { return m.trim(); })
|
||||
.filter(function (m) { return m.length !== 0; });
|
||||
|
||||
Client.updateMailingList($scope.domain.domain, $scope.mailinglists.edit.name, members, function (error) {
|
||||
Client.updateMailingList($scope.domain.domain, $scope.mailinglists.edit.name, members, $scope.mailinglists.edit.membersOnly, function (error) {
|
||||
$scope.mailinglists.edit.busy = false;
|
||||
$scope.mailinglists.edit.error = {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user