8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-22 03:13:12 +00:00

jout de l'option de redirection des mails

This commit is contained in:
grisel-davy 2018-08-17 13:16:03 +02:00
parent e94400c9eb
commit 9df9149894
4 changed files with 37 additions and 0 deletions

View file

@ -126,6 +126,8 @@ class EditGeneralOptionForm(ModelForm):
self.fields['email_from'].label = "Adresse mail d\
'expedition automatique"
self.fields['GTU_sum_up'].label = "Résumé des CGU"
self.fields['all_mail_redirect'].label = "Redirection de tout les mails"
self.fields['redirect_address'].label = 'Adresse de redirection'
class EditAssoOptionForm(ModelForm):

View file

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2018-08-17 11:08
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('preferences', '0049_optionaluser_self_change_shell'),
]
operations = [
migrations.AddField(
model_name='generaloption',
name='all_mail_redirect',
field=models.BooleanField(default=True, help_text='Redirect all sent mail to the choosen address'),
),
migrations.AddField(
model_name='generaloption',
name='redirect_address',
field=models.EmailField(default='no-reply@example.com', help_text='Where to redirect all mails', max_length=254),
),
]

View file

@ -237,6 +237,8 @@ class GeneralOption(AclMixin, PreferencesModel):
req_expire_hrs = models.IntegerField(default=48)
site_name = models.CharField(max_length=32, default="Re2o")
email_from = models.EmailField(default="www-data@example.com")
all_mail_redirect = models.BooleanField(default=True, help_text="Redirect all sent mail to the choosen address")
redirect_address = models.EmailField(default="no-reply@example.com", help_text="Where to redirect all mails")
GTU_sum_up = models.TextField(
default="",
blank=True,

View file

@ -160,6 +160,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<th>CGU</th>
<td>{{generaloptions.GTU}}</th>
</tr>
</tr>
<th>Redirection des mails envoyés</th>
<td>{{ generaloptions.all_mail_redirect|tick }}</td>
{% if generaloptions.all_mail_redirect %}
<th> Adresse mail de redirection <th>
<td>{{ generaloptions.redirect_address }}</td>
{% endif %}
</tr>
</table>