1(function () { 2 'use strict'; 3 4 angular 5 .module('app') 6 .controller('cancelBookingController', cancelBookingController); 7 8 cancelBookingController.$inject = ['dialogData', '$mdDialog']; 9 10 function cancelBookingController(dialogData, $mdDialog) { 11 var vm = this; 12 vm.formValid = false; 13 vm.activity = dialogData.activity; 14 15 vm.cancel = function () { 16 $mdDialog.cancel(); 17 }; 18 19 vm.validateForm = function() { 20 if (!vm.activity.cancelReasonId) { 21 vm.formValid = false; 22 return; 23 } 24 //if (vm.activity.cancelReasonId === 6 && !vm.activity.cancelReasonComment) { 25 // vm.formValid = false; 26 // return; 27 //} 28 else 29 vm.formValid = true; 30 }; 31 32 vm.ok = function () { 33 if (!vm.activity.cancelReasonId) 34 return; 35 //if (vm.activity.cancelReasonId === 6 && !vm.activity.cancelReasonComment) 36 // return; 37 $mdDialog.hide(vm.activity); 38 }; 39 } 40})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.