12345678910111213141516171819202122232425262728293031 |
- /**
- * Created by robin on 11/4/15.
- */
-
- angular.module('luticate')
- .controller('GroupEditController', ['$scope', 'luticateAuthGroups', 'data',
- function($scope, luticateAuthGroups, data) {
- if (data != null) {
- $scope.group = data;
- }
- else {
- $scope.group = {
- Name: ""
- }
- }
-
- $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
- });
- }
- }
- }]);
|