mirror of
https://github.com/bitwarden/web
synced 2026-01-09 20:14:01 +00:00
groups list/add/edit
This commit is contained in:
24
src/app/organization/organizationGroupsAddController.js
Normal file
24
src/app/organization/organizationGroupsAddController.js
Normal file
@@ -0,0 +1,24 @@
|
||||
angular
|
||||
.module('bit.organization')
|
||||
|
||||
.controller('organizationGroupsAddController', function ($scope, $state, $uibModalInstance, apiService,
|
||||
$analytics) {
|
||||
$analytics.eventTrack('organizationGroupsAddController', { category: 'Modal' });
|
||||
|
||||
$scope.submit = function (model) {
|
||||
var group = {
|
||||
name: model.name
|
||||
};
|
||||
$scope.submitPromise = apiService.groups.post({ orgId: $state.params.orgId }, group, function (response) {
|
||||
$analytics.eventTrack('Created Group');
|
||||
$uibModalInstance.close({
|
||||
id: response.Id,
|
||||
name: response.Name
|
||||
});
|
||||
}).$promise;
|
||||
};
|
||||
|
||||
$scope.close = function () {
|
||||
$uibModalInstance.dismiss('cancel');
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user