{# -*- engine:django -*- #}

{% extends "core/base.html" %}

{% load i18n material_form %}

{% block browser_title %}{% blocktrans %}Register for an Evaluation{% endblocktrans %}{% endblock %}
{% block page_title %}{% blocktrans with phase=object.name %}Register for {{ phase }}{% endblocktrans %}{% endblock %}

{% block content %}
  <form method="post" action="">
    {% csrf_token %}

    <div class="card">
      <div class="card-content">
        <div class="card-title">{% trans "Registration for EvaLU – Evaluation of teaching and lesson quality" %}</div>
        <div class="row">
          <div class="margin-bottom">
            {{ object.privacy_notice|safe }}
          </div>
        </div>
        <div class="row">
          {% form form=form %}{% endform %}
          <figure class="alert warning">
            <i class="material-icons left">warning</i>
            {% blocktrans %}
              Please be aware that the data will be deleted permanently after the evaluation phase.
              That will also prevent you from making comparisons with this data in future years.
              It is not possible to change the above selection later.
            {% endblocktrans %}
          </figure>
        </div>
        <div class="row">
          <em>
            {% blocktrans %}
              I can withdraw my consent to the collection and processing of my personal data
              for the purpose of the above-mentioned evaluation at any time without giving reasons.
            {% endblocktrans %}
          </em>
        </div>
        <div class="row">
          <p>
            {% now "DATE_FORMAT" as now_d %}
            {% blocktrans with date=now_d place=SITE_PREFERENCES.evalu__place %}
              {{ place }}, {{ date }}
            {% endblocktrans %}
          </p>
          <p>
            {{ request.user.person.first_name }} {{ request.user.person.last_name }}
          </p>
        </div>
      </div>
    </div>

    <div class="card">
      <div class="card-content">
        <div class="card-title">{% trans "Evaluation password" %}</div>
        {% blocktrans %}
          Please select a secure password which should be used to encrypt your evaluation results. It should be hard to
          guess and contain at least ten characters.
        {% endblocktrans %}
        <figure class="alert warning">
          <i class="material-icons left">warning</i>
          {% blocktrans %}
            If you loose your password, there is absolutely no option to restore the evaluation results. So, please keep
            your password in a safe place.
          {% endblocktrans %}
        </figure>
        <div class="input-field">
          {{ form.password }}
          <label for="id_password">{% trans "Evaluation password" %}</label>
          {{ form.password.errors }}
        </div>
        <div class="input-field">
          {{ form.password_confirm }}
          <label for="id_password_confirm">{% trans "Confirm evaluation password" %}</label>
          {{ form.password_confirm.errors }}
        </div>
      </div>
    </div>

    <div class="card">
      <div class="card-content">
        <button type="submit" class="btn green waves-effect waves-light">
          <i class="material-icons right">send</i>
          {% trans "Register" %}
        </button>
      </div>
    </div>
  </form>
{% endblock %}
