From 7c07ea771a97c504579e5a40d9e57d21a62feaeb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ma=C3=ABl=20Kervella?=
Date: Fri, 8 Sep 2017 17:22:03 +0000
Subject: [PATCH 1/9] =?UTF-8?q?Met=20en=20param=C3=A8tre=20un=20messsage?=
=?UTF-8?q?=20personalis=C3=A9=20dans=20le=20mail=20de=20bienvenue?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
users/templates/users/email_welcome | 19 ++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/users/templates/users/email_welcome b/users/templates/users/email_welcome
index c9d3b570..72338cbf 100644
--- a/users/templates/users/email_welcome
+++ b/users/templates/users/email_welcome
@@ -1,16 +1,11 @@
Bonjour {{nom}} !
Vous êtes maintenant adhérent du {{asso_name}} ! Nous sommes ravis de vous accueillir
-dans l'association. Outre l'accès à Internet, vous pourrez participer aux activités
-que nous proposons et profiter des services mis en place. Ceux-ci sont à découvrir
-sur le site Re2o qui vous permet aussi de gérer vos informations personnelles.
-
-Si vous n'avez pas été enregistré directement par un élève sur place vous devez suivre ce guide expliquant la procédure de connexion (vous devriez commencer avant d'arriver afin d'avoir internet tout de suite) : https://slides.rezometz.org/welcome
+dans l'association.
Votre pseudo est : {{pseudo}}
-Le {{asso_name}} recrute ! Nous sommes passionnés (et bénévoles), alors si vous êtes intéressé
-de près ou de loin pour nous aider, n'hésitez pas !
+{{personalized_message}}
Pour nous faire part de toute remarque, suggestion ou problème vous pouvez nous
envoyer un mail à {{asso_email}}.
@@ -22,18 +17,12 @@ L'équipe de {{asso_name}}.
Welcome to the {{asso_name}} !
-We are the association that provides an internet acces in the dorm of ALOES
-
-If you have never been in contact with a member of the association you need to follow this guide explaining how to connect (even if you are not in the dorm yet) : https://slides.rezometz.org/welcome
-
Your username is : {{pseudo}}
-
As a member of the association, not only can you access to the Internet but also a
-variety of services that you can discover on the website Re2o (log in using your
-credentials).
+{{personalized_message_en}}
For any information, suggestion or problem, you can contact us via email at
{{asso_email}}.
Regards,
-The (voluntary) {{asso_name}} team.
+The {{asso_name}} team.
From 0c10e59890c25f057b02f6b56f4a30a43e401a35 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ma=C3=ABl=20Kervella?=
Date: Fri, 8 Sep 2017 17:23:42 +0000
Subject: [PATCH 2/9] =?UTF-8?q?Retours=20=C3=A0=20la=20ligne=20inutiles=20?=
=?UTF-8?q?C'est=20au=20navigateur/client=20mail=20de=20retourner=20=C3=A0?=
=?UTF-8?q?=20la=20ligne=20en=20bout=20de=20fen=C3=AAtre=20Apr=C3=A8s=20?=
=?UTF-8?q?=C3=A7a=20fait=20des=20trucs=20tout=20moches=20sur=20les=20gran?=
=?UTF-8?q?d=20=C3=A9crans?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
users/templates/users/email_welcome | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/users/templates/users/email_welcome b/users/templates/users/email_welcome
index 72338cbf..f88ec1a5 100644
--- a/users/templates/users/email_welcome
+++ b/users/templates/users/email_welcome
@@ -1,14 +1,12 @@
Bonjour {{nom}} !
-Vous êtes maintenant adhérent du {{asso_name}} ! Nous sommes ravis de vous accueillir
-dans l'association.
+Vous êtes maintenant adhérent de {{asso_name}} ! Nous sommes ravis de vous accueillir dans l'association.
Votre pseudo est : {{pseudo}}
-{{personalized_message}}
+{{personalized_message_fr}}
-Pour nous faire part de toute remarque, suggestion ou problème vous pouvez nous
-envoyer un mail à {{asso_email}}.
+Pour nous faire part de toute remarque, suggestion ou problème vous pouvez nous envoyer un mail à {{asso_email}}.
À bientôt,
L'équipe de {{asso_name}}.
From 933fdde7e9b55a644ca2449a31a23abc95cc80bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ma=C3=ABl=20Kervella?=
Date: Fri, 8 Sep 2017 19:19:32 +0000
Subject: [PATCH 3/9] Ajoute l'option pour les envoi d'email
---
install_re2o.sh | 42 ++++++++++++++++++++++++++++++++++
re2o/settings_local.example.py | 3 +++
2 files changed, 45 insertions(+)
diff --git a/install_re2o.sh b/install_re2o.sh
index 9100bc15..aff54cb0 100755
--- a/install_re2o.sh
+++ b/install_re2o.sh
@@ -171,6 +171,46 @@ ldap_host="localhost"
fi
+TITLE="Hôte pour l'envoi de mail"
+email_host=$(dialog --title "$TITLE" \
+ --backtitle "$BACKTITLE" \
+ --inputbox "$TITLE" $HEIGHT $WIDTH \
+ 2>&1 >/dev/tty)
+
+TITLE="Port du serveur mail"
+OPTIONS=(25 "25 (SMTP)"
+ 465 "465 (SMTPS)"
+ 587 "587 (Submission)")
+
+email_port=$(dialog --clear \
+ --backtitle "$BACKTITLE" \
+ --title "$TITLE" \
+ --menu "$MENU" \
+ $HEIGHT $WIDTH $CHOICE_HEIGHT \
+ "${OPTIONS[@]}" \
+ 2>&1 >/dev/tty)
+clear
+if [ $ldap_is_local == 2 ]
+then
+TITLE="Cn ldap admin"
+ldap_cn=$(dialog --title "$TITLE" \
+ --backtitle "$BACKTITLE" \
+ --inputbox "$TITLE" $HEIGHT $WIDTH \
+ 2>&1 >/dev/tty)
+clear
+TITLE="Hote ldap"
+ldap_host=$(dialog --title "$TITLE" \
+ --backtitle "$BACKTITLE" \
+ --inputbox "$TITLE" $HEIGHT $WIDTH \
+ 2>&1 >/dev/tty)
+clear
+else
+ldap_cn="cn=admin,"
+ldap_cn+=$ldap_dn
+ldap_host="localhost"
+fi
+
+
echo "Installation des paquets de base"
apt-get -y install python3-django python3-dateutil texlive-latex-base texlive-fonts-recommended python3-djangorestframework python3-django-reversion python3-pip libsasl2-dev libldap2-dev libssl-dev
pip3 install django-bootstrap3
@@ -229,6 +269,8 @@ sed -i 's/SUPER_SECRET_LDAP/'"$ldap_password"'/g' re2o/settings_local.py
sed -i 's/ldap_host_ip/'"$ldap_host"'/g' re2o/settings_local.py
sed -i 's/dc=example,dc=org/'"$ldap_dn"'/g' re2o/settings_local.py
sed -i 's/example.org/'"$extension_locale"'/g' re2o/settings_local.py
+sed -i 's/MY_EMAIL_HOST/'"$email_host"'/g' re2o/settings_local.py
+sed -i 's/MY_EMAIL_PORT/'"$email_port"'/g' re2o/settings_local.py
echo "Application des migrations"
python3 manage.py migrate
diff --git a/re2o/settings_local.example.py b/re2o/settings_local.example.py
index 6110bc02..466c953d 100644
--- a/re2o/settings_local.example.py
+++ b/re2o/settings_local.example.py
@@ -61,6 +61,9 @@ SESSION_COOKIE_AGE = 60 * 60 * 3
LOGO_PATH = "static_files/logo.png"
+EMAIL_HOST = 'MY_EMAIL_HOST'
+EMAIL_PORT = MY_EMAIL_PORT
+
# Reglages pour la bdd ldap
LDAP = {
'base_user_dn' : 'cn=Utilisateurs,dc=example,dc=org',
From c3f569f10ed625bb0db6040898b1f42d24a28f36 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ma=C3=ABl=20Kervella?=
Date: Fri, 8 Sep 2017 19:21:20 +0000
Subject: [PATCH 4/9] =?UTF-8?q?Asso=20'de'=20est=20plus=20g=C3=A9n=C3=A9ri?=
=?UTF-8?q?que=20que=20asso=20'du'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
users/templates/users/email_ban_notif | 6 +++---
users/templates/users/email_passwd_request | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/users/templates/users/email_ban_notif b/users/templates/users/email_ban_notif
index 67cb4e14..f61cd840 100644
--- a/users/templates/users/email_ban_notif
+++ b/users/templates/users/email_ban_notif
@@ -1,8 +1,8 @@
Bonjour {{name}},
-Vous avez été banni par un administrateur du {{ asso_name }} en raison de {{raison}}. Vous n'avez plus accès au réseau jusqu'au {{date_end}}.
+Vous avez été banni par un administrateur de {{ asso_name }} en raison de {{raison}}. Vous n'avez plus accès au réseau jusqu'au {{date_end}}.
-Pour de plus amples informations, rendez-vous à l'accueil du {{ asso_name }}.
+Pour de plus amples informations, rendez-vous à l'accueil de {{ asso_name }}.
Cordialement,
- L'équipe du {{ asso_name }}.
+ L'équipe de {{ asso_name }}.
diff --git a/users/templates/users/email_passwd_request b/users/templates/users/email_passwd_request
index cc8df186..2a648d55 100644
--- a/users/templates/users/email_passwd_request
+++ b/users/templates/users/email_passwd_request
@@ -12,7 +12,7 @@ Ce lien expirera dans {{ expire_in }}.
Cordialement,
-L'équipe de {{ asso }} {{ asso_mail }}.
+L'équipe de {{ asso }} (contact : {{ asso_mail }}).
----------------------
@@ -30,4 +30,4 @@ any other question.
Thanks
-The team of {{ asso }}
+The team of {{ asso }} (contact : {{ asso_mail }}).
From 30f5ac60913934c64b18e8e75e96ac1e31fbb248 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ma=C3=ABl=20Kervella?=
Date: Fri, 8 Sep 2017 20:53:13 +0000
Subject: [PATCH 5/9] =?UTF-8?q?Ajoute=20un=20message=20personalis=C3=A9=20?=
=?UTF-8?q?dans=20le=20mail=20d'acceuil=20via=20les=20pr=C3=A9f=C3=A9rence?=
=?UTF-8?q?s=20Attention=20migration=20=C3=A0=20faire?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
preferences/admin.py | 7 ++++--
preferences/forms.py | 12 +++++++++-
.../migrations/0017_mailmessageoption.py | 23 +++++++++++++++++++
preferences/models.py | 7 ++++++
.../preferences/display_preferences.html | 19 +++++++++++++++
preferences/urls.py | 1 +
preferences/views.py | 7 +++---
users/models.py | 13 +++++++----
users/templates/users/email_welcome | 4 ++--
9 files changed, 80 insertions(+), 13 deletions(-)
create mode 100644 preferences/migrations/0017_mailmessageoption.py
diff --git a/preferences/admin.py b/preferences/admin.py
index d4c41e62..867596fe 100644
--- a/preferences/admin.py
+++ b/preferences/admin.py
@@ -23,7 +23,7 @@
from django.contrib import admin
from reversion.admin import VersionAdmin
-from .models import OptionalUser, OptionalMachine, OptionalTopologie, GeneralOption, Service, AssoOption
+from .models import OptionalUser, OptionalMachine, OptionalTopologie, GeneralOption, Service, AssoOption, MailMessageOption
class OptionalUserAdmin(VersionAdmin):
pass
@@ -31,7 +31,6 @@ class OptionalUserAdmin(VersionAdmin):
class OptionalTopologieAdmin(VersionAdmin):
pass
-
class OptionalMachineAdmin(VersionAdmin):
pass
@@ -44,9 +43,13 @@ class ServiceAdmin(VersionAdmin):
class AssoOptionAdmin(VersionAdmin):
pass
+class MailMessageOptionAdmin(VersionAdmin):
+ pass
+
admin.site.register(OptionalUser, OptionalUserAdmin)
admin.site.register(OptionalMachine, OptionalMachineAdmin)
admin.site.register(OptionalTopologie, OptionalTopologieAdmin)
admin.site.register(GeneralOption, GeneralOptionAdmin)
admin.site.register(Service, ServiceAdmin)
admin.site.register(AssoOption, AssoOptionAdmin)
+admin.site.register(MailMessageOption, MailMessageOptionAdmin)
diff --git a/preferences/forms.py b/preferences/forms.py
index 37e9c7ea..1c1188c7 100644
--- a/preferences/forms.py
+++ b/preferences/forms.py
@@ -22,7 +22,7 @@
from django.forms import ModelForm, Form, ValidationError
from django import forms
-from .models import OptionalUser, OptionalMachine, OptionalTopologie, GeneralOption, AssoOption, Service
+from .models import OptionalUser, OptionalMachine, OptionalTopologie, GeneralOption, AssoOption, MailMessageOption, Service
from django.db.models import Q
class EditOptionalUserForm(ModelForm):
@@ -72,6 +72,16 @@ class EditAssoOptionForm(ModelForm):
model = AssoOption
fields = '__all__'
+class EditMailMessageOptionForm(ModelForm):
+ class Meta:
+ model = MailMessageOption
+ fields = '__all__'
+
+ def __init__(slef, *args, **kwargs):
+ super(EditMailMessageOptionForm, self).__init__(*args, **kwargs)
+ self.fields['welcome_mail_fr'].label = 'Message dans le mail d\'acceuil en français'
+ self.fields['welcome_mail_en'].label = 'Message dans le mail d\'acceuil en anglais'
+
class ServiceForm(ModelForm):
class Meta:
model = Service
diff --git a/preferences/migrations/0017_mailmessageoption.py b/preferences/migrations/0017_mailmessageoption.py
new file mode 100644
index 00000000..31fb145c
--- /dev/null
+++ b/preferences/migrations/0017_mailmessageoption.py
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.7 on 2017-09-08 20:17
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('preferences', '0016_auto_20170902_1520'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='MailMessageOption',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('welcome_mail_fr', models.TextField(default='')),
+ ('welcome_mail_en', models.TextField(default='')),
+ ],
+ ),
+ ]
diff --git a/preferences/models.py b/preferences/models.py
index 92822190..b56faf3d 100644
--- a/preferences/models.py
+++ b/preferences/models.py
@@ -87,3 +87,10 @@ class AssoOption(models.Model):
telephone = models.CharField(max_length=15, default="0000000000")
pseudo = models.CharField(default="Asso", max_length=32)
utilisateur_asso = models.OneToOneField('users.User', on_delete=models.PROTECT, blank=True, null=True)
+
+class MailMessageOption(models.Model):
+ PRETTY_NAME = "Options de corps de mail"
+
+ welcome_mail_fr = models.TextField(default="")
+ welcome_mail_en = models.TextField(default="")
+
diff --git a/preferences/templates/preferences/display_preferences.html b/preferences/templates/preferences/display_preferences.html
index 394a4714..515404e7 100644
--- a/preferences/templates/preferences/display_preferences.html
+++ b/preferences/templates/preferences/display_preferences.html
@@ -155,6 +155,25 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{{ assooptions.utilisateur_asso }} |
+ Messages personalisé dans les mails
+ {% if is_bureau %}
+
+
+ Editer
+
+ {% endif %}
+
+
+
+
+ Message Français |
+ {{ mailmessageoptions.welcome_mail_fr }} |
+
+
+ Message Anglais |
+ {{ mailmessageoptions.welcome_mail_en }} |
+
+
Liste des services page d'accueil
{% if is_infra %}
Ajouter un service
diff --git a/preferences/urls.py b/preferences/urls.py
index dd9ccd8b..624971d8 100644
--- a/preferences/urls.py
+++ b/preferences/urls.py
@@ -31,6 +31,7 @@ urlpatterns = [
url(r'^edit_options/(?POptionalTopologie)$', views.edit_options, name='edit-options'),
url(r'^edit_options/(?PGeneralOption)$', views.edit_options, name='edit-options'),
url(r'^edit_options/(?PAssoOption)$', views.edit_options, name='edit-options'),
+ url(r'^edit_options/(?PMailMessageOption)$', views.edit_options, name='edit-options'),
url(r'^add_services/$', views.add_services, name='add-services'),
url(r'^edit_services/(?P[0-9]+)$', views.edit_services, name='edit-services'),
url(r'^del_services/$', views.del_services, name='del-services'),
diff --git a/preferences/views.py b/preferences/views.py
index dc29aee2..66ecd101 100644
--- a/preferences/views.py
+++ b/preferences/views.py
@@ -43,7 +43,7 @@ from reversion.models import Version
from reversion import revisions as reversion
from .forms import ServiceForm, DelServiceForm
-from .models import Service, OptionalUser, OptionalMachine, AssoOption, GeneralOption, OptionalTopologie
+from .models import Service, OptionalUser, OptionalMachine, AssoOption, MailMessageOption, GeneralOption, OptionalTopologie
from . import models
from . import forms
@@ -60,9 +60,10 @@ def display_options(request):
machineoptions, created = OptionalMachine.objects.get_or_create()
topologieoptions, created = OptionalTopologie.objects.get_or_create()
generaloptions, created = GeneralOption.objects.get_or_create()
- assooptions, crated = AssoOption.objects.get_or_create()
+ assooptions, created = AssoOption.objects.get_or_create()
+ mailmessageoptions, created = MailMessageOption.objects.get_or_create()
service_list = Service.objects.all()
- return form({'useroptions': useroptions, 'machineoptions': machineoptions, 'topologieoptions': topologieoptions, 'generaloptions': generaloptions, 'assooptions' : assooptions, 'service_list':service_list}, 'preferences/display_preferences.html', request)
+ return form({'useroptions': useroptions, 'machineoptions': machineoptions, 'topologieoptions': topologieoptions, 'generaloptions': generaloptions, 'assooptions' : assooptions, 'mailmessageoptions' : mailmessageoptions, 'service_list':service_list}, 'preferences/display_preferences.html', request)
@login_required
@permission_required('admin')
diff --git a/users/models.py b/users/models.py
index 34f20fdc..4034a2f3 100644
--- a/users/models.py
+++ b/users/models.py
@@ -47,7 +47,7 @@ from django.core.validators import MinLengthValidator
from topologie.models import Room
from cotisations.models import Cotisation, Facture, Paiement, Vente
from machines.models import Interface, Machine, regen
-from preferences.models import GeneralOption, AssoOption, OptionalUser
+from preferences.models import GeneralOption, AssoOption, OptionalUser, MailMessageOption
now = timezone.now()
@@ -415,15 +415,18 @@ class User(AbstractBaseUser):
def notif_inscription(self):
""" Prend en argument un objet user, envoie un mail de bienvenue """
t = loader.get_template('users/email_welcome')
- options, created = AssoOption.objects.get_or_create()
+ assooptions, created = AssoOption.objects.get_or_create()
+ mailmessageoptions, created = MailMessageOption.objects.get_or_create()
general_options, created = GeneralOption.objects.get_or_create()
c = Context({
'nom': str(self.name) + ' ' + str(self.surname),
- 'asso_name': options.name,
- 'asso_email': options.contact,
+ 'asso_name': assooptions.name,
+ 'asso_email': assooptions.contact,
+ 'welcome_mail_fr' : mailmessageoptions.welcome_mail_fr,
+ 'welcome_mail_en' : mailmessageoptions.welcome_mail_en,
'pseudo':self.pseudo,
})
- send_mail('Bienvenue au %(name)s / Welcome to %(name)s' % {'name': options.name }, '',
+ send_mail('Bienvenue au %(name)s / Welcome to %(name)s' % {'name': assooptions.name }, '',
general_options.email_from, [self.email], html_message=t.render(c))
return
diff --git a/users/templates/users/email_welcome b/users/templates/users/email_welcome
index f88ec1a5..690f69d1 100644
--- a/users/templates/users/email_welcome
+++ b/users/templates/users/email_welcome
@@ -4,7 +4,7 @@
Votre pseudo est : {{pseudo}}
-{{personalized_message_fr}}
+{{welcome_mail_fr|safe}}
Pour nous faire part de toute remarque, suggestion ou problème vous pouvez nous envoyer un mail à {{asso_email}}.
@@ -17,7 +17,7 @@ L'équipe de {{asso_name}}.
Your username is : {{pseudo}}
-{{personalized_message_en}}
+{{welcome_mail_en|safe}}
For any information, suggestion or problem, you can contact us via email at
{{asso_email}}.
From 8841399831c3bcd11aa3e3f4500ad740178e56a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ma=C3=ABl=20Kervella?=
Date: Fri, 8 Sep 2017 21:30:47 +0000
Subject: [PATCH 6/9] Rend plus joli certains forms des preferences Adresse de
l'asso sur deux lignes Nom plus explicite dans edit_preferences pour chaque
field
---
preferences/forms.py | 22 +++++++++++++++----
.../preferences/display_preferences.html | 3 ++-
2 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/preferences/forms.py b/preferences/forms.py
index 1c1188c7..0f803980 100644
--- a/preferences/forms.py
+++ b/preferences/forms.py
@@ -66,21 +66,35 @@ class EditGeneralOptionForm(ModelForm):
self.fields['search_display_page'].label = 'Resultats affichés dans une recherche'
self.fields['pagination_number'].label = 'Items par page, taille normale (ex users)'
self.fields['pagination_large_number'].label = 'Items par page, taille élevée (machines)'
+ self.fields['req_expire_hrs'].label = 'Temps avant expiration du lien de reinitialisation de mot de passe (en heures)'
+ self.fields['site_name'].label = 'Nom du site web'
+ self.fields['email_from'].label = 'Adresse mail d\'expedition automatique'
class EditAssoOptionForm(ModelForm):
class Meta:
model = AssoOption
fields = '__all__'
+ def __init__(self, *args, **kwargs):
+ super(EditAssoOptionForm, self).__init__(*args, **kwargs)
+ self.fields['name'].label = 'Nom de l\'asso'
+ self.fields['siret'].label = 'SIRET'
+ self.fields['adresse1'].label = 'Adresse (ligne 1)'
+ self.fields['adresse2'].label = 'Adresse (ligne 2)'
+ self.fields['contact'].label = 'Email de contact'
+ self.fields['telephone'].label = 'Numéro de téléphone'
+ self.fields['pseudo'].label = 'Pseudo d\'usage'
+ self.fields['utilisateur_asso'].label = 'Compte utilisé pour faire les modifications depuis /admin'
+
class EditMailMessageOptionForm(ModelForm):
class Meta:
model = MailMessageOption
fields = '__all__'
- def __init__(slef, *args, **kwargs):
- super(EditMailMessageOptionForm, self).__init__(*args, **kwargs)
- self.fields['welcome_mail_fr'].label = 'Message dans le mail d\'acceuil en français'
- self.fields['welcome_mail_en'].label = 'Message dans le mail d\'acceuil en anglais'
+ def __init__(self, *args, **kwargs):
+ super(EditMailMessageOptionForm, self).__init__(*args, **kwargs)
+ self.fields['welcome_mail_fr'].label = 'Message dans le mail d\'accueil en français'
+ self.fields['welcome_mail_en'].label = 'Message dans le mail d\'accueil en anglais'
class ServiceForm(ModelForm):
class Meta:
diff --git a/preferences/templates/preferences/display_preferences.html b/preferences/templates/preferences/display_preferences.html
index 515404e7..ba0806d6 100644
--- a/preferences/templates/preferences/display_preferences.html
+++ b/preferences/templates/preferences/display_preferences.html
@@ -140,7 +140,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
Adresse |
- {{ assooptions.adresse1 }} {{ assooptions.adresse2 }} |
+ {{ assooptions.adresse1 }}
+ {{ assooptions.adresse2 }} |
Contact mail |
{{ assooptions.contact }} |
From f7ad09725159085b131ef784d80aebcb8cd797bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ma=C3=ABl=20Kervella?=
Date: Fri, 8 Sep 2017 21:58:59 +0000
Subject: [PATCH 7/9] =?UTF-8?q?Affichage=20du=20solde=20n=C3=A9gatif=20dan?=
=?UTF-8?q?s=20les=20pref=20si=20activ=C3=A9=20(branche=20pas=20adapt?=
=?UTF-8?q?=C3=A9=20pour=20=C3=A7a=20mais=20osef,=20je=20le=20fais=20au=20?=
=?UTF-8?q?passage)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
preferences/templates/preferences/display_preferences.html | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/preferences/templates/preferences/display_preferences.html b/preferences/templates/preferences/display_preferences.html
index ba0806d6..9dfc08f6 100644
--- a/preferences/templates/preferences/display_preferences.html
+++ b/preferences/templates/preferences/display_preferences.html
@@ -47,6 +47,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
Champ gpg fingerprint |
{{ useroptions.gpg_fingerprint }} |
+ {% if useroptions.user_solde %}
+ Solde négatif |
+ {{ useroptions.solde_negatif }} |
+ {% endif %}
Préférences machines
From 6383016fbf3f1ca385472a086ad6ae84f9bb9f60 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ma=C3=ABl=20Kervella?=
Date: Sat, 9 Sep 2017 11:39:28 +0000
Subject: [PATCH 8/9] =?UTF-8?q?Affichage=20du=20message=20dans=20les=20pre?=
=?UTF-8?q?f=C3=A9rences=20tel=20qu'il=20sera=20affich=C3=A9=20dans=20le?=
=?UTF-8?q?=20mail=20=3D=20utilisation=20de=20safe=20pour=20ne=20pas=20esc?=
=?UTF-8?q?ape=20les=20charact=C3=A8res=20/!\Char=20pas=20aescape=20donc?=
=?UTF-8?q?=20injections=20possible=20/!\=20(mais=20normalement=20seul=20l?=
=?UTF-8?q?e=20bureau=20peut=20=C3=A9dit=20donc=20jesp=C3=A8re=20qu'ils=20?=
=?UTF-8?q?sont=20reponsable=20un=20minimum)=20/!\=20En=20cas=20de=20conne?=
=?UTF-8?q?rie=20qui=20emp=C3=AAche=20d'acc=C3=A9der=20=20la=20page=20pour?=
=?UTF-8?q?=20modif=20il=20y=20a=20tjs=20le=20/admin?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
preferences/templates/preferences/display_preferences.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/preferences/templates/preferences/display_preferences.html b/preferences/templates/preferences/display_preferences.html
index 9dfc08f6..50880f95 100644
--- a/preferences/templates/preferences/display_preferences.html
+++ b/preferences/templates/preferences/display_preferences.html
@@ -172,11 +172,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
Message Français |
- {{ mailmessageoptions.welcome_mail_fr }} |
+ {{ mailmessageoptions.welcome_mail_fr | safe }} |
Message Anglais |
- {{ mailmessageoptions.welcome_mail_en }} |
+ {{ mailmessageoptions.welcome_mail_en | safe }} |
Liste des services page d'accueil
From ea55c51c9d6988f9148aa0c058d4aa96662b98ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ma=C3=ABl=20Kervella?=
Date: Sat, 9 Sep 2017 14:09:49 +0000
Subject: [PATCH 9/9] =?UTF-8?q?Pr=C3=A9cision=20que=20le=20texte=20est=20p?=
=?UTF-8?q?our=20le=20mail=20de=20bienvenue?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
preferences/forms.py | 4 ++--
preferences/templates/preferences/display_preferences.html | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/preferences/forms.py b/preferences/forms.py
index 0f803980..ca2df893 100644
--- a/preferences/forms.py
+++ b/preferences/forms.py
@@ -93,8 +93,8 @@ class EditMailMessageOptionForm(ModelForm):
def __init__(self, *args, **kwargs):
super(EditMailMessageOptionForm, self).__init__(*args, **kwargs)
- self.fields['welcome_mail_fr'].label = 'Message dans le mail d\'accueil en français'
- self.fields['welcome_mail_en'].label = 'Message dans le mail d\'accueil en anglais'
+ self.fields['welcome_mail_fr'].label = 'Message dans le mail de bienvenue en français'
+ self.fields['welcome_mail_en'].label = 'Message dans le mail de bienvenue en anglais'
class ServiceForm(ModelForm):
class Meta:
diff --git a/preferences/templates/preferences/display_preferences.html b/preferences/templates/preferences/display_preferences.html
index 50880f95..d96f4ed7 100644
--- a/preferences/templates/preferences/display_preferences.html
+++ b/preferences/templates/preferences/display_preferences.html
@@ -171,11 +171,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
- Message Français |
+ Mail de bienvenue (Français) |
{{ mailmessageoptions.welcome_mail_fr | safe }} |
- Message Anglais |
+ Mail de bienvenue (Anglais) |
{{ mailmessageoptions.welcome_mail_en | safe }} |