{% load avatars djblets_forms djblets_utils i18n %}

{% block pre_fields %}{% endblock %}

{{form.non_field_errors}}

{% for field in form %}
{%  if field.is_hidden %}
{{field}}
{%  endif %}
{% endfor %}

<div class="avatar-file-upload-config">
 <div class="avatar-preview{% if not configuration.file_path %} avatar-preview-unset{% endif %}">
{% if configuration.file_path %}
  <img src="{% avatar_url request.user 48 '1x' avatar_service_id %}" alt="{% trans "Your current avatar" %}">
{% endif %}
 </div>

 <div class="avatar-file-upload-instructions">
{% blocktrans %}
  Drag an image or <a class="avatar-file-upload-browse" href="#">browse</a> to
  set your avatar
{% endblocktrans %}
 </div>

 <div class="avatar-file-upload-drop-instructions">
{% blocktrans %}
  Drop the image to set your avatar
{% endblocktrans %}
 </div>

<div style="display: none;">
 <label id="avatar-file-upload-browse-label"
        for="id_file-upload-avatar_upload"></label>
 {{form.avatar_upload}}
</div>
</div>

{{form.avatar_upload.errors}}
