From 1de27e51bb75e9781bbf34ad352ae34958c250e8 Mon Sep 17 00:00:00 2001 From: chirac Date: Fri, 29 Jun 2018 18:20:25 +0200 Subject: [PATCH] Boolean compte mail actif/inactif --- .../0036_optionaluser_mail_accounts.py | 20 +++++++++++++++++++ preferences/models.py | 4 ++++ .../preferences/display_preferences.html | 12 ++++++----- 3 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 preferences/migrations/0036_optionaluser_mail_accounts.py diff --git a/preferences/migrations/0036_optionaluser_mail_accounts.py b/preferences/migrations/0036_optionaluser_mail_accounts.py new file mode 100644 index 00000000..c3bf4fa8 --- /dev/null +++ b/preferences/migrations/0036_optionaluser_mail_accounts.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2018-06-29 16:01 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('preferences', '0035_optionaluser_mail_extension'), + ] + + operations = [ + migrations.AddField( + model_name='optionaluser', + name='mail_accounts', + field=models.BooleanField(default=False, help_text='Activation des comptes mails pour les utilisateurs'), + ), + ] diff --git a/preferences/models.py b/preferences/models.py index 42c22d53..ebfae5fe 100644 --- a/preferences/models.py +++ b/preferences/models.py @@ -85,6 +85,10 @@ class OptionalUser(AclMixin, PreferencesModel): blank=True, null=True ) + mail_accounts = models.BooleanField( + default=False, + help_text="Activation des comptes mails pour les utilisateurs" + ) mail_extension = models.CharField( max_length = 32, default = "@example.org", diff --git a/preferences/templates/preferences/display_preferences.html b/preferences/templates/preferences/display_preferences.html index 83ce10bb..7e503021 100755 --- a/preferences/templates/preferences/display_preferences.html +++ b/preferences/templates/preferences/display_preferences.html @@ -33,11 +33,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,

Préférences utilisateur

- Editer - -

-

- + Editer + +

+

+
Généralités
+
@@ -69,6 +70,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
Téléphone obligatoirement requis {{ useroptions.is_tel_mandatory|tick }}{{ useroption.max_mail_alias }}
+

Préférences machines