 
   $scope.ok = () ->
     $scope.form.submitted = true
-
     if $scope.form.$valid
       $modalInstance.close($scope.fields.text.val)
 


  $scope.ok = () ->
    $scope.form.submitted = true

    if $scope.form.$valid
      $modalInstance.close({summary: $scope.fields.summary.val, assignee: $scope.fields.assignee.val})
  $scope.cancel = () -> $modalInstance.dismiss('cancel')

  $scope.fields = {note: {val: '', maxLength: maxLength}}

  $scope.ok = () ->
    $scope.form.submitted = true

    if $scope.form.$valid
      $modalInstance.close($scope.fields.note.val)

