 
     super options, data
 
-    {type, actionType} = @getOptions()
-    @utils.defer => @setAceEditor() if (type is "Group" and actionType is "Insert") or type is "Item"
-
-    @setVisibilityOfOverlayWarning @parentData.overlay is "no" # wtf "no"
+    @utils.defer => @setAceEditor() if @getOptions().type is "Item"
+    if @getOptions().type is "Group"
+      @setVisibilityOfOverlayWarning @parentData.overlay is "no" # wtf "no"
 
   save: ->
-    {actionType} = @getOptions()
-
-    if @getOptions().type is "Group"
+    options      = @getOptions()
+    {actionType, addingToAGroup} = options
+
+    if @getOptions().type is "Group" or addingToAGroup
       return @insertParent() if actionType is "Insert"
       @updateParent()
     else

            cssClass  : "help-text warning"
        change: =>
          @setVisibilityOfOverlayWarning @inputs.Overlay.getValue() is "no" # wtf "no"

      Visibility       :
        label         : "Visibility"
        type          : "select"


  createPostData: ->
    {inputs}     = @

    if @getOptions().type is "Group"
      groupData =
        title      : inputs.Title.getValue()
        expiryDate : inputs.ExpiryDate.getValue()
        visibility : inputs.Visibility.getValue()
        overlay    : inputs.Overlay.getValue()
        snippets   : []
      return groupData

    else
      editorValue = @aceEditor?.getValue()
      snippet     = """new KDView({partial: "#{editorValue}"});""" if @snippetType is "Text"

      itemData    =
        introId    : inputs.IntroId.getValue()
        introTitle : inputs.IntroTitle.getValue()
        snippet    : snippet or editorValue

      return itemData

  setVisibilityOfOverlayWarning: (isShowing) ->
    @warningView = @warningView or @fields?.warning.getSubViews()[1].getSubViews()[0]
