Project

General

Profile

« Previous | Next » 

Revision 50661

View differences:

affiliations.js
37 37
		}
38 38
	}
39 39

  
40
	$scope.saveAffiliation = function(aff) { alert('TODO'); }
40
	$scope.saveAffiliation = function(aff) {
41
		
42
		delete $scope.tempAffiliation['pname'];
43
		
44
		if (!aff.gid) {
45
			show_notification("error","Group not selected");
46
			return;
47
		}
48
		
49
		showSpinner();
50
		$http.post('portal/addAffiliation', aff).success(function(data) {
51
			hideSpinner();
52
			$scope.refresh();
53
		}).error(function() {
54
			hideSpinner();
55
			show_notification("error","An error occurred saving affiliations");
56
		});
57
	}
41 58
	
42 59
	$scope.refresh();
43 60
	

Also available in: Unified diff