mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 19:33:11 +00:00
jout de l'option de redirection des mails
This commit is contained in:
parent
e94400c9eb
commit
9df9149894
4 changed files with 37 additions and 0 deletions
|
@ -126,6 +126,8 @@ class EditGeneralOptionForm(ModelForm):
|
||||||
self.fields['email_from'].label = "Adresse mail d\
|
self.fields['email_from'].label = "Adresse mail d\
|
||||||
'expedition automatique"
|
'expedition automatique"
|
||||||
self.fields['GTU_sum_up'].label = "Résumé des CGU"
|
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):
|
class EditAssoOptionForm(ModelForm):
|
||||||
|
|
25
preferences/migrations/0050_auto_20180817_1308.py
Normal file
25
preferences/migrations/0050_auto_20180817_1308.py
Normal 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),
|
||||||
|
),
|
||||||
|
]
|
|
@ -237,6 +237,8 @@ class GeneralOption(AclMixin, PreferencesModel):
|
||||||
req_expire_hrs = models.IntegerField(default=48)
|
req_expire_hrs = models.IntegerField(default=48)
|
||||||
site_name = models.CharField(max_length=32, default="Re2o")
|
site_name = models.CharField(max_length=32, default="Re2o")
|
||||||
email_from = models.EmailField(default="www-data@example.com")
|
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(
|
GTU_sum_up = models.TextField(
|
||||||
default="",
|
default="",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
|
|
@ -160,6 +160,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
<th>CGU</th>
|
<th>CGU</th>
|
||||||
<td>{{generaloptions.GTU}}</th>
|
<td>{{generaloptions.GTU}}</th>
|
||||||
</tr>
|
</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>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue