<div class="modal-body">
  <div>
    <div>
      <input type="radio" id="system-avatar" name="avatar" value="system" {{action "useSystem"}}>
      <label class="radio" for="system-avatar">{{bound-avatar controller "large" system_avatar_upload_id}} {{{i18n 'user.change_avatar.letter_based'}}}</label>
    </div>
    <div>
      <input type="radio" id="gravatar" name="avatar" value="gravatar" {{action "useGravatar"}}>
      <label class="radio" for="gravatar">{{bound-avatar controller "large" gravatar_avatar_upload_id}} {{{i18n 'user.change_avatar.gravatar'}}} {{email}}</label>
      {{d-button action="refreshGravatar" title="user.change_avatar.refresh_gravatar_title" disabled=gravatarRefreshDisabled class="no-text" icon="refresh"}}
    </div>
    <div>
      <input type="radio" id="uploaded_avatar" name="avatar" value="uploaded" {{action "useUploadedAvatar"}}>
      <label class="radio" for="uploaded_avatar">
        {{#if hasUploadedAvatar}}
          {{#if uploadedAvatarTemplate}}
            {{bound-avatar-template uploadedAvatarTemplate "large"}}
          {{else}}
            {{bound-avatar controller "large" custom_avatar_upload_id}} {{i18n 'user.change_avatar.uploaded_avatar'}}
          {{/if}}
        {{else}}
          {{i18n 'user.change_avatar.uploaded_avatar_empty'}}
        {{/if}}
      </label>
      {{avatar-uploader username=username
                        uploadedAvatarTemplate=uploadedAvatarTemplate
                        custom_avatar_upload_id=custom_avatar_upload_id
                        done="useUploadedAvatar"}}
    </div>
  </div>
</div>

<div class="modal-footer">
  {{d-button action="saveAvatarSelection" class="btn-primary" disabled=saveDisabled label="save"}}
  <a {{action "closeModal"}}>{{i18n 'cancel'}}</a>
</div>
