{% extends "base.html" %}
{% load i18n static core_tags wagtailsettings_tags %}
{% get_settings %}
{% block content %}
<div class="profiles">
  <div class="profiles__wrapper">
    <div class="heading heading--hero">
      <h3 class="heading__component">
        {% trans "Thank you for joining!" %}
      </h3>
    </div>
    <div class="profiles__inner">
      {% with profile_settings=settings.profiles.UserProfilesSettings %}
        {% if profile_settings.activate_dob and not profile_settings.capture_dob_on_reg or profile_settings.activate_display_name and not profile_settings.capture_display_name_on_reg or profile_settings.activate_gender and not profile_settings.capture_gender_on_reg or profile_settings.activate_location and not profile_settings.capture_location_on_reg or profile_settings.activate_education_level and not profile_settings.capture_education_level_on_reg %}
        <p class="heading__subtitle">
          {% trans "Let us know more about yourself to get access to exclusive content." %}
        </p>
        <form method="post" action="{% url "molo.profiles:registration_done" %}" class="profiles__form" novalidate>
        {% csrf_token %}
          {% if profile_settings.activate_dob and not profile_settings.capture_dob_on_reg %}
          <fieldset>
            <label for="date_of_birth">
              {% trans "Select Date Of Birth" %}
            </label>
            {{ form.date_of_birth }}
            {{ form.date_of_birth.errors}}
          </fieldset>
          {% endif %}

          {% if profile_settings.activate_display_name and not profile_settings.capture_display_name_on_reg %}
          <fieldset>
            <label for="alias">{% trans "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 profile_settings.activate_gender and not profile_settings.capture_gender_on_reg %}
          <fieldset>
            <label for="gender">{% trans "I Identify My Gender As:" %}</label>
            {{ form.gender }}
            {{ form.gender.errors }}
            <span class="input-hint">
              {% trans "Only you will see this" %}.
            </span>
          </fieldset>
          {% endif %}
          {% if profile_settings.activate_location and not profile_settings.capture_location_on_reg %}
          <fieldset>
            <label for="location">{% trans "Where Do You Live?" %}</label>
            {{ form.location }}
            {{ form.location.errors }}
            <span class="input-hint">
              {% trans "Only you will see this" %}.
            </span>
          </fieldset>
          {% endif %}
          {% if profile_settings.activate_education_level and not profile_settings.capture_education_level_on_reg %}
          <fieldset>
            <label for="education_level">
              {% trans "What Is Your Highest Level Of Education?" %}
            </label>
            {{ form.education_level }}
            {{ form.education_level.errors }}
           <span class="input-hint">{% trans "Only you will see this" %}.</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>
            <a href="{% url "molo.profiles:view_my_profile" %}" class="call-to-action__button call-to-action__button--primary">{% trans "Profile" %}</a>
          </div>
        </form>
          <a href="/" class="call-to-action__button call-to-action__button--previous">{% trans "Home Page" %}</a>
        {% endif %}
      {% endwith %}
    </div>
  </div>
</div>
{% endblock %}
