<div class="modal-body">
  <div>
    <div>
      <input type="radio" id="avatar" name="avatar" value="gravatar" {{action useGravatar}}>
      <label class="radio" for="avatar">{{avatar controller imageSize="large" template="gravatar_template"}} {{{i18n user.change_avatar.gravatar}}} {{email}}</label>
      <a href="//gravatar.com/emails" target="_blank" title="{{i18n user.change_avatar.gravatar_title}}" class="btn"><i class="icon-pencil"></i></a>
    </div>
    <div>
      <input type="radio" id="uploaded_avatar" name="avatar" value="uploaded_avatar" {{action useUploadedAvatar}}>
      <label class="radio" for="uploaded_avatar">
        {{#if has_uploaded_avatar}}
          {{boundAvatar controller imageSize="large" template="uploaded_avatar_template"}} {{i18n user.change_avatar.uploaded_avatar}}
        {{else}}
          {{i18n user.change_avatar.uploaded_avatar_empty}}
        {{/if}}
      </label>
      <button id="fake-avatar-input" class="btn" {{bindAttr disabled="view.uploading"}} title="{{i18n user.change_avatar.upload_title}}">
        <i class="icon-picture"></i>&nbsp;{{view.uploadButtonText}}
      </button>
      <input type="file" id="avatar-input" accept="image/*" style="display:none">
      {{#if view.uploading}}
        <span>{{i18n upload_selector.uploading}} {{view.uploadProgress}}%</span>
      {{/if}}
      {{#if view.imageIsNotASquare}}
        <div class="warning">{{i18n user.change_avatar.image_is_not_a_square}}</div>
      {{/if}}
    </div>
  </div>
</div>

<div class="modal-footer">
  <button class="btn btn-primary" {{action saveAvatarSelection}} data-dismiss="modal" {{bindAttr disabled="view.saveDisabled"}}>{{i18n save}}</button>
  <a data-dismiss="modal">{{i18n cancel}}</a>
</div>
