mail list: add members only checkbox
This commit is contained in:
@@ -175,6 +175,11 @@
|
||||
<textarea ng-model="mailinglists.add.membersTxt" class="form-control" rows="5"></textarea>
|
||||
<small>Separate email addresses with a newline</small>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="mailinglists.add.membersOnly">Restrict posting to members only</input>
|
||||
</label>
|
||||
</div>
|
||||
<input class="hide" type="submit" ng-disabled="mailinglistadd_form.$invalid || mailinglists.add.membersTxt.length === 0 || mailinglists.add.busy"/>
|
||||
</form>
|
||||
</div>
|
||||
@@ -202,6 +207,11 @@
|
||||
<textarea ng-model="mailinglists.edit.membersTxt" class="form-control" rows="5"></textarea>
|
||||
<small>Separate email addresses with a newline</small>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="mailinglists.edit.membersOnly">Restrict posting to members only</input>
|
||||
</label>
|
||||
</div>
|
||||
<input class="hide" type="submit" ng-disabled="mailinglistedit_form.$invalid || mailinglists.edit.busy"/>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
+5
-2
@@ -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