1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-10 04:23:53 +00:00

groups list/add/edit

This commit is contained in:
Kyle Spearrin
2017-05-08 16:01:36 -04:00
parent ea82925e14
commit 9c706f07f0
10 changed files with 280 additions and 5 deletions

View 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');
};
});