 
 # ===== DIRECTIVE =============================================================
 
-app.directive "csWizard", ['$rootScope', 'ResourceService', '$document', 'csDescriptorService', 'csLog', ($rootScope, ResourceService, $document, csDescriptorService, csLog) ->
+app.directive "csWizard", ['$rootScope', 'ResourceService', '$document', 'csDescriptorService', 'csLog', 'csAlertService', 'csRoute', ($rootScope, ResourceService, $document, csDescriptorService, csLog, csAlertService, csRoute) ->
 
 
   # ===== COMPILE =============================================================


    #Setting csLog
    csLog.set($scope, "csWizard")

    $scope.loading = true
    $scope.errors = []

      notify_listeners($scope, 'wizard-canceled', resource) if $scope.panelStack.length == 0

    $scope.$on 'form-submit', (event, resource, attribute) ->

      $scope.log("form-submit-event")
      if $scope.panelStack.length == 1
        $scope.log("form-submit-event")
        notify_listeners($scope, 'wizard-submited', resource)
        popPanel($scope) unless $scope.csWizardOptions['keep-first']
      else
