{% extends "authentic2/base-page.html" %}
{% load i18n %}

{% block title %}
    {% trans "Registration" %}
{% endblock %}

{% block content %}
      <h2>{% trans "Registration" %}</h2>
      <p>{% trans "Please fill the form to complete your registration" %}</p>
      <form method="post">
        {% csrf_token %}
        {{ form.as_p }}

        <p>
        <input type="checkbox" id="cgu-checkbox" name="cgu" style="width: auto;"/>
        <strong>J'accepte les <a target="_new" href="{{portal_url}}conditions-dutilisation/">conditions
                        d'utilisation de l'e-guichet de la Ville de Liège</a>.</strong>
        </p>

        <input type="submit" disabled value="{% trans 'Submit' %}" />
      </form>

      <script>
$(function() {
  $('#cgu-checkbox').on('change', function() {
    $('input[type=submit]').prop('disabled', !$(this).prop('checked'));
  });
});
      </script>
{% endblock %}
