2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
20 app.controller('pdpInGroupController' , function ($scope, $modalInstance, message, Notification){
21 $scope.edit = 'false';
22 if(message.pdpInGroup==null)
23 $scope.label='Add PDP to Group'
25 $scope.label='Edit PDP In Group'
26 $scope.disableCd=true;
29 $scope.editPDPInGroup = message.pdpInGroup;
30 $scope.editActivePDP = message.activePDP;
32 $scope.savePDPInGroup = function(pdpInGroup) {
33 var uuu = "pdp_Group/save_pdpTogroup.htm";
34 var postData={pdpInGroup: pdpInGroup,
35 activePDP: $scope.editActivePDP,
36 update : $scope.edit};
41 contentType: 'application/json',
42 data: JSON.stringify(postData),
43 success : function(data){
44 $scope.$apply(function(){
45 $scope.data=data.data;});
46 console.log($scope.data);
47 $modalInstance.close({data:$scope.data});
49 error : function(data){
50 Notification.error("Error Occured while Creating/Updating a PDP Group");
55 $scope.close = function() {
56 $modalInstance.close();