diff --git a/Apollo/assets/js/controllers/report_markcard_certificateCtrl.js b/Apollo/assets/js/controllers/report_markcard_certificateCtrl.js index af4fe036..740b6bb6 100755 --- a/Apollo/assets/js/controllers/report_markcard_certificateCtrl.js +++ b/Apollo/assets/js/controllers/report_markcard_certificateCtrl.js @@ -83,7 +83,32 @@ app.controller('report_markcard_certificateCtrl', ["$scope", "$filter","$rootSco } }); } + /* watch university model for bind batch objects*/ + $scope.$watchCollection('univModel.university', function (newValue,oldValue) { + if(newValue==undefined || newValue==''){ + $scope.filterBatchDetails=""; + $scope.disableSubmit=true; + } + else{ + if(angular.isString(newValue)){ + $scope.filterBatchDetails=angular.fromJson(newValue); + $scope.disableSubmit=false; + } + } + + }); + // disable submit + $scope.$watchCollection('filters.from_date', function (newValue,oldValue) { + if(newValue==undefined || newValue=='' || newValue==null){ + $scope.disableSubmit=true; + } + else{ + $scope.disableSubmit=false; + + } + + }); $scope.onSubmit = function () { //alert($scope.batch.name); $scope.mark_cert_data = '';