all files / js/administration/ addFormModal.controller.js

28.57% Statements 2/7
0% Branches 0/2
0% Functions 0/3
28.57% Lines 2/7
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24                                           
/**
 * Created by cklimkowsky on 3/16/15.
 */
angular
    .module('coopEval')
    .controller('AddFormModalController', AddFormModalController);
 
function AddFormModalController($scope, $modalInstance, formType) {
 
    // The new form to be created, with a name and an indication of
    // whether it is a student form or employer form
    $scope.form = {
        name: null,
        isStudentForm: formType == 0 ? true : false
    };
 
    $scope.add = function () {
        $modalInstance.close($scope.form);
    };
 
    $scope.cancel = function () {
        $modalInstance.dismiss();
    };
}