Bring the invite checkbox back, only now disabled by default

This commit is contained in:
Johannes Zellner
2021-09-16 20:17:37 +02:00
parent aca618fb1e
commit fe2856195e
2 changed files with 10 additions and 0 deletions

View File

@@ -130,6 +130,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
displayName: '',
selectedGroups: [],
role: 'user',
sendInvite: false,
show: function () {
if ($scope.config.features.userMaxCount && $scope.config.features.userMaxCount <= $scope.allUsers.length) {
@@ -143,6 +144,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
$scope.useradd.displayName = '';
$scope.useradd.selectedGroups = [];
$scope.useradd.role = 'user';
$scope.useradd.sendInvite = false;
$scope.useradd_form.$setUntouched();
$scope.useradd_form.$setPristine();
@@ -209,6 +211,8 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
if (error) return console.error(error);
if ($scope.useradd.sendInvite) Client.sendInvite(userId, function (error) { if (error) console.error('Failed to send invite.', error); });
refresh();
refreshAllUsers();