 
       activeField = _.find($scope.panelStack[panelIndex].resource.descriptor.fields, (o) -> o.attribute == attribute)
       activeField.inactive = false if activeField
-      
-      panelDescriptor = 
+
+      panelDescriptor =
         resource: angular.copy(ResourceService.get(resource_type))
         parent: parent
         formMode: 'create'

      $scope.csWizardOptions['form-class']

    # ===== COMPILE DOM WITH APPROPRIATE DIRECTIVE ========
    
    if $scope.panel.directive
      innerElement = angular.element(element[0])
      inputTemplate = """

        $scope.panelStack[0].item = $scope.csWizardOptions['form-item']

    $scope.$watchCollection 'panelStack', (newPanelStack, oldPanelStack) ->
      if newPanelStack
        attrs.$set 'numberOfPanels', newPanelStack.length
        $scope.numberOfPanels = newPanelStack.length

    # ===== LIFECYCLE EVENTS ==============================

