1234567891011121314151617181920212223242526272829303132333435363738 |
- /**
- * Created by robin on 11/4/15.
- */
-
- angular.module('luticate')
- .controller('GroupEditController', ['$scope', 'luticateAuthGroups', 'data', 'dialogs',
- function($scope, luticateAuthGroups, data, dialogs) {
- if (data != null) {
- $scope.group = data;
- $scope.permission = "LU_GROUP_EDIT";
- }
- else {
- $scope.group = {
- Name: ""
- };
- $scope.permission = "LU_GROUP_ADD";
- }
-
- $scope.submitForm = function()
- {
- if ($scope.group.Id != null) {
- return luticateAuthGroups.edit({
- group_id: $scope.group.Id,
- group_name: $scope.group.Name
- });
- }
- else {
- return luticateAuthGroups.add({
- group_name: $scope.group.Name
- });
- }
- };
-
- $scope.editPermissions = function(group)
- {
- dialogs.create('views/modals/grouppermissions.html', 'GroupPermissionsController', group);
- };
- }]);
|