8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-24 07:53:47 +00:00

Boolean compte mail actif/inactif

This commit is contained in:
chirac 2018-06-29 18:20:25 +02:00
parent 58a495db54
commit 7544757606
3 changed files with 36 additions and 6 deletions

View file

@ -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'),
),
]

View file

@ -103,11 +103,15 @@ class OptionalUser(AclMixin, PreferencesModel):
blank=True, blank=True,
null=True null=True
) )
mail_accounts = models.BooleanField(
default=False,
help_text="Activation des comptes mails pour les utilisateurs"
)
mail_extension = models.CharField( mail_extension = models.CharField(
max_length = 32, max_length = 32,
default = "@example.org", default = "@example.org",
help_text="Extension principale pour les mails internes", help_text="Extension principale pour les mails internes",
) )
class Meta: class Meta:
permissions = ( permissions = (

View file

@ -36,6 +36,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</a> </a>
<p> <p>
</p> </p>
<h5>Généralités</h5>
<table class="table table-striped"> <table class="table table-striped">
<tr> <tr>
<th>Téléphone obligatoirement requis</th> <th>Téléphone obligatoirement requis</th>
@ -55,11 +56,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<th>Creations de clubs par tous</th> <th>Creations de clubs par tous</th>
<td>{{ useroptions.all_can_create_club }}</td> <td>{{ useroptions.all_can_create_club }}</td>
</tr> </tr>
</table>
<h5>Gestion du solde {% if useroptions.user_solde %}<span class="label label-success">Activé{% else %}<span class="label label-danger"> Désactivé{% endif%}</span></h5>
<table class="table table-striped">
<tr> <tr>
<th>Activation du solde pour les utilisateurs</th> <th>Activation du solde pour les utilisateurs</th>
<td>{{ useroptions.user_solde }}</td> <td>{{ useroptions.user_solde }}</td>
{% if useroptions.user_solde %}
<th>Solde négatif</th> <th>Solde négatif</th>
<td>{{ useroptions.solde_negatif }}</td> <td>{{ useroptions.solde_negatif }}</td>
</tr> </tr>
@ -69,14 +72,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<th>Montant minimal de rechargement en ligne</th> <th>Montant minimal de rechargement en ligne</th>
<td>{{ useroptions.min_online_payment }}</td> <td>{{ useroptions.min_online_payment }}</td>
</tr> </tr>
{% else %} </table>
</tr> <h5>Comptes mails {% if useroptions.mail_accounts %}<span class="label label-success">Activé{% else %}<span class="label label-danger"> Désactivé{% endif%}</span></h5>
{% endif%} <table class="table table-striped">
<tr> <tr>
<th>Gestion des comptes mails</th>
<td>{{ useroptions.mail_accounts }}</td>
<th>Extension mail interne</th> <th>Extension mail interne</th>
<td>{{ useroptions.mail_extension }}</td> <td>{{ useroptions.mail_extension }}</td>
</tr> </tr>
</table> </table>
<h4>Préférences machines</h4> <h4>Préférences machines</h4>
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'OptionalMachine' %}"> <a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'OptionalMachine' %}">
<i class="fa fa-edit"></i> <i class="fa fa-edit"></i>