From 7c3c951146d993d790a6892df76a43b6b7104ea6 Mon Sep 17 00:00:00 2001 From: Yoann Pietri Date: Sun, 15 Jul 2018 16:45:14 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20des=20pr=C3=A9f=C3=A9rences=20pour=20la?= =?UTF-8?q?=20v=C3=A9rification=20du=20mail?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- preferences/models.py | 9 +++++++++ .../templates/preferences/display_preferences.html | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/preferences/models.py b/preferences/models.py index 560fa30f..c25dc3cd 100644 --- a/preferences/models.py +++ b/preferences/models.py @@ -102,6 +102,15 @@ class OptionalUser(AclMixin, PreferencesModel): blank=True, null=True ) + mail_verification = models.BooleanField( + default=True, + help_text = "Vérification du mail obligatoire" + ) + verification_time = models.PositiveIntegerField( + blank=True, + null=True, + help_text = "Durée (en heures) pour vérifier son compte (laisser vide pour ne pas avoir de limite" + ) class Meta: permissions = ( diff --git a/preferences/templates/preferences/display_preferences.html b/preferences/templates/preferences/display_preferences.html index 99e3e14f..389b1831 100644 --- a/preferences/templates/preferences/display_preferences.html +++ b/preferences/templates/preferences/display_preferences.html @@ -71,6 +71,14 @@ with this program; if not, write to the Free Software Foundation, Inc., Shell par défaut des utilisateurs {{ useroptions.shell_default }} + + Vérification du mail + {{ useroptions.mail_verification}} + {% if useroptions.mail_verification %} + Temps pour vérifier + {{ useroptions.verification_time | default:"0" }}h + {% endif %} +

Préférences machines