       if isPrivateGroup
         modalOptions.tabs.forms['Membership policy'] =
           title   : "Membership policy"
+        modalOptions.tabs.forms['Invitations'] =
+          title   : "Invitations"
 
     modal = new KDModalViewWithForms modalOptions, group
     


    if err.accessCode is ERROR_POLICY
      defaultOptions.buttons['Request access'] = 
        cssClass  : 'cupid-green'
        callback  : -> @getDelegate().emit 'AccessIsRequested'

    _.extend defaultOptions, customOptions

  showErrorModal:(group, err)->
    modal = new KDModalView getErrorModalOptions err
    modal.on 'AccessIsRequested', @requestAccess.bind this, group
    console.log {modal}

  requestAccess:(group)->
    group.requestInvitation (err)->
      console.log 'invitation is requested', arguments

  openPrivateGroup:(group)->
    group.canOpenGroup (err, policy)=>

              membershipPolicyView.emit 'MembershipPolicyChangeSaved'

          forms["Membership policy"].addSubView membershipPolicyView

        invitationRequestView = new GroupsInvitationRequestsView {}, group
        forms["Invitations"] = invitationRequestView
    
      forms["Members"].addSubView new GroupsMemberPermissionsView {}, group

