{% extends "base.html" %}
{% load i18n wagtailsettings_tags %}
{% get_settings %}
{% block content %}
<div class="profiles">
  <div class="profiles__wrapper">
    <div class="heading heading--hero">
      <h1 class="heading__component">{% trans "Edit Profile" %}</h1>
    </div>
    <div class="profiles__inner">
      <form method="post" action="{% url "molo.profiles:edit_my_profile" %}" class="profiles__form" novalidate>
      {% csrf_token %}
        {% if settings.profiles.UserProfilesSettings.activate_display_name %}
        <fieldset>
          <label for="alias">{% trans "Update your display name:" %}</label>
          {{ form.alias }}
          {{ form.alias.errors}}
          <span class="input-hint">{% trans "We value your online security, therefore we hide your username and allow you to comment and interact with the site with a display name." %}</span>
        </fieldset>
        {% endif %}
        {% if settings.profiles.UserProfilesSettings.activate_dob %}
        <fieldset>
          <label for="date_of_birth">{% trans "Update your date of birth:" %}</label>
          {{ form.date_of_birth }}
          {{ form.date_of_birth.errors}}
        </fieldset>
        {% endif %}
        {% if settings.profiles.UserProfilesSettings.activate_gender %}
        <fieldset>
          <label for="gender">{% trans "Update your gender:" %}</label>
          {{ form.gender }}
          {{ form.gender.errors}}
          <span class="input-hint">{% trans "Only you will see this" %}.</span>
        </fieldset>
        {% endif %}
        {% if settings.profiles.UserProfilesSettings.activate_location %}
        <fieldset>
          <label for="location">{% trans "Update where you live:" %}</label>
          {{ form.location }}
          {{ form.location.errors}}
          <span class="input-hint">{% trans "Only you will see this" %}.</span>
        </fieldset>
        {% endif %}
        {% if settings.profiles.UserProfilesSettings.activate_education_level %}
        <fieldset>
          <label for="education_level">{% trans "Update your Education Level:" %}</label>
          {{ form.education_level }}
          {{ form.education_level.errors}}
          <span class="input-hint">{% trans "Only you will see this" %}.</span>
        </fieldset>
        {% endif %}
        {% if settings.profiles.UserProfilesSettings.show_mobile_number_field and settings.profiles.UserProfilesSettings.country_code %}
          <fieldset>
            <label for="id_mobile_number">{% trans "Update your mobile number:" %}</label>
            {{ form.mobile_number }}
            {{ form.mobile_number.errors }}
            <span class="input-hint">{% trans "(e.g. 0754556789)" %}</span>
          </fieldset>
        {% endif %}
        {% if settings.profiles.UserProfilesSettings.show_email_field %}
        <fieldset>
          <label for="id_email">{% trans "Update your email address:" %}</label>
          {{ form.email}}
          {{ form.email.errors }}
          <span class="input-hint">{% trans "(e.g. example@foo.com)" %}</span>
        </fieldset>
        {% endif %}
        <div class="call-to-action--group">
          <button type="submit" class="call-to-action__button call-to-action__button--primary">{% trans "Save" %}</button>
        </div>
      </form>
    </div>
  </div>
</div>
{% endblock %}
