mirror of
https://github.com/ae-utbm/sith.git
synced 2026-09-26 14:14:20 +00:00
use DatetimeField to store cgu approval
Au lieu de dire si l'utilisateur a approuvé les CGUs ou non, on dit quand est-ce qu'il les a approuvées. Si la date de la dernière approbation est antérieure à la date de la dernière révision des CGUs, alors on demande à nouveau de les approuver.
This commit is contained in:
@@ -27,9 +27,9 @@
|
||||
{% endtrans %}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ form.cgu_approved.errors }}
|
||||
{{ form.cgu_approved }}
|
||||
{{ form.cgu_approved.label_tag() }}
|
||||
{{ form.cgu_approved_at.errors }}
|
||||
{{ form.cgu_approved_at }}
|
||||
{{ form.cgu_approved_at.label_tag() }}
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="next" value="{{ next }}">
|
||||
|
||||
@@ -19,15 +19,15 @@
|
||||
{% csrf_token %}
|
||||
{% render_honeypot_field %}
|
||||
{% for field in form %}
|
||||
{% if field.name not in ["cgu_approved", "captcha"] %}
|
||||
{% if field.name not in ["cgu_approved_at", "captcha"] %}
|
||||
<div>{{ field.as_field_group() }}</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<div class="captcha">{{ form.captcha.as_field_group() }}</div>
|
||||
<div class="form-group">
|
||||
{{ form.cgu_approved.errors }}
|
||||
{{ form.cgu_approved }}
|
||||
{{ form.cgu_approved.label_tag() }}
|
||||
{{ form.cgu_approved_at.errors }}
|
||||
{{ form.cgu_approved_at }}
|
||||
{{ form.cgu_approved_at.label_tag() }}
|
||||
</div>
|
||||
<input type="submit" class="btn btn-blue" value="{% trans %}Register{% endtrans %}" />
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user