{{#d-modal-body rawTitle=title}}
  <form class="form-vertical group-add-members">
    <div class="control-group">
      <label class="control-label">
        {{i18n "groups.add_members.usernames"}}
      </label>
      <p class="description">
        {{i18n "groups.add_members.description"}}
      </p>

      {{email-group-user-chooser
        class="input-xxlarge"
        value=usernamesAndEmails
        id="group-add-members-user-selector"
        onChange=(action (mut usernamesAndEmails))
        options=(hash
          allowEmails=true
          filterPlaceholder="groups.add_members.input_placeholder"
        )
      }}
    </div>

    {{#if model.can_admin_group}}
      <div class="control-group group-add-members-make-owner">
        <label>
          {{input type="checkbox"
              class="inline"
              checked=setAsOwner
              disabled=emailsPresent}}
          {{i18n "admin.groups.add_members.as_owner"}}
        </label>
      </div>
    {{/if}}

    <div class="control-group group-add-members-notify-users">
      <label>
        {{input type="checkbox"
            class="inline"
            checked=notifyUsers
            disabled=notifyUsersDisabled}}
        {{i18n "groups.add_members.notify_users"}}
      </label>
    </div>
  </form>
{{/d-modal-body}}

<div class="modal-footer">
  {{d-button action=(action "addMembers")
      class="add btn-primary"
      icon="plus"
      disabled=disableAddButton
      label="groups.add"}}
</div>
