Add group add form

This commit is contained in:
Johannes Zellner
2016-02-10 16:24:25 +01:00
parent 1ab46a96f9
commit cf3d503a74
2 changed files with 46 additions and 0 deletions

View File

@@ -35,6 +35,12 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
password: ''
};
$scope.groupadd = {
busy: false,
error: {},
name: ''
};
$scope.isMe = function (user) {
return user.username === Client.getUserInfo().username;
};
@@ -59,6 +65,16 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
});
};
$scope.showGroupAdd = function () {
$scope.groupadd.error = {};
$scope.groupadd.name = '';
$scope.groupAddForm.$setUntouched();
$scope.groupAddForm.$setPristine();
$('#groupAddModal').modal('show');
};
$scope.showUserAdd = function () {
$scope.useradd.error = {};
$scope.useradd.username = '';