diff --git a/cfp/forms.py b/cfp/forms.py index 7f28a78..84c7891 100644 --- a/cfp/forms.py +++ b/cfp/forms.py @@ -327,4 +327,4 @@ class VolunteerForm(forms.ModelForm): class Meta: model = Volunteer - fields = ['name', 'email', 'phone_number', 'notes'] + fields = ['name', 'email', 'phone_number', 'sms_prefered', 'notes'] diff --git a/cfp/migrations/0016_auto_20171103_1842.py b/cfp/migrations/0016_auto_20171103_1842.py new file mode 100644 index 0000000..69051ec --- /dev/null +++ b/cfp/migrations/0016_auto_20171103_1842.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.1 on 2017-11-03 18:42 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('cfp', '0015_conference_schedule_redirection_url'), + ] + + operations = [ + migrations.AddField( + model_name='volunteer', + name='sms_prefered', + field=models.BooleanField(default=False, verbose_name='SMS prefered'), + ), + migrations.AlterField( + model_name='conference', + name='schedule_redirection_url', + field=models.URLField(blank=True, default='', help_text='If specified, schedule tab will redirect to this URL.', verbose_name='Schedule redirection URL'), + ), + migrations.AlterField( + model_name='volunteer', + name='email', + field=models.EmailField(max_length=254, verbose_name='Email'), + ), + ] diff --git a/cfp/models.py b/cfp/models.py index aa31c99..b8bf6e3 100644 --- a/cfp/models.py +++ b/cfp/models.py @@ -406,9 +406,10 @@ class Vote(PonyConfModel): class Volunteer(PonyConfModel): site = models.ForeignKey(Site, on_delete=models.CASCADE) name = models.CharField(max_length=128, verbose_name=_('Your Name')) - email = models.EmailField() + email = models.EmailField(verbose_name=_('Email')) token = models.UUIDField(default=uuid.uuid4, editable=False, unique=True) phone_number = models.CharField(max_length=64, blank=True, default='', verbose_name=_('Phone number')) + sms_prefered = models.BooleanField(default=False, verbose_name=_('SMS prefered')) language = models.CharField(max_length=10, blank=True) notes = models.TextField(default='', blank=True, verbose_name=_('Notes'), help_text=_('If you have some constraints, you can indicate them here.')) diff --git a/cfp/templates/cfp/staff/volunteer_details.html b/cfp/templates/cfp/staff/volunteer_details.html index e334e7d..650c183 100644 --- a/cfp/templates/cfp/staff/volunteer_details.html +++ b/cfp/templates/cfp/staff/volunteer_details.html @@ -12,7 +12,7 @@
{{ volunteer.email }}
{% if volunteer.phone_number %}
{% trans "Phone number" %}
-
{{ volunteer.phone_number }}
+
{{ volunteer.phone_number }}{% if volunteer.sms_prefered %} (SMS){% endif %}
{% endif %} diff --git a/locale/fr/LC_MESSAGES/django.mo b/locale/fr/LC_MESSAGES/django.mo index 6635a94..753eedf 100644 Binary files a/locale/fr/LC_MESSAGES/django.mo and b/locale/fr/LC_MESSAGES/django.mo differ diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index c0bc783..308ab72 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-11-03 14:15+0000\n" -"PO-Revision-Date: 2017-11-03 15:16+0100\n" +"POT-Creation-Date: 2017-11-03 18:42+0000\n" +"PO-Revision-Date: 2017-11-03 19:43+0100\n" "Last-Translator: \n" "Language-Team: \n" "Language: fr\n" @@ -42,7 +42,7 @@ msgstr "Confirmé" msgid "Cancelled" msgstr "Annulé" -#: cfp/forms.py:41 cfp/models.py:437 +#: cfp/forms.py:41 cfp/models.py:438 msgid "Activity" msgstr "Activité" @@ -65,12 +65,12 @@ msgstr "Catégorie" msgid "Title" msgstr "Titre" -#: cfp/forms.py:87 cfp/models.py:137 cfp/models.py:432 +#: cfp/forms.py:87 cfp/models.py:137 cfp/models.py:433 #: cfp/templates/cfp/staff/talk_details.html:64 msgid "Description" msgstr "Description" -#: cfp/forms.py:88 cfp/models.py:105 cfp/models.py:413 +#: cfp/forms.py:88 cfp/models.py:105 cfp/models.py:414 #: cfp/templates/cfp/staff/participant_details.html:16 #: cfp/templates/cfp/staff/talk_details.html:78 #: cfp/templates/cfp/staff/volunteer_details.html:20 @@ -156,7 +156,7 @@ msgstr "Ajouter une étiquette" msgid "Put in a room" msgstr "Assigner à une salle" -#: cfp/forms.py:183 cfp/models.py:135 cfp/models.py:187 cfp/models.py:430 +#: cfp/forms.py:183 cfp/models.py:135 cfp/models.py:187 cfp/models.py:431 #: cfp/templates/cfp/staff/participant_list.html:35 #: cfp/templates/cfp/staff/volunteer_list.html:29 msgid "Name" @@ -367,15 +367,24 @@ msgstr "Refusé" msgid "Pending decision, score: %(score).1f" msgstr "En cours, score : %(score).1f" -#: cfp/models.py:414 +#: cfp/models.py:409 cfp/templates/cfp/staff/volunteer_details.html:11 +#: cfp/templates/cfp/staff/volunteer_list.html:30 +msgid "Email" +msgstr "E-mail" + +#: cfp/models.py:412 +msgid "SMS prefered" +msgstr "SMS préférés" + +#: cfp/models.py:415 msgid "If you have some constraints, you can indicate them here." msgstr "Si vous avez des contraintes, vous pouvez les indiquer ici." -#: cfp/models.py:433 cfp/templates/cfp/staff/volunteer_details.html:8 +#: cfp/models.py:434 cfp/templates/cfp/staff/volunteer_details.html:8 msgid "Volunteer" msgstr "Bénévole" -#: cfp/models.py:438 cfp/templates/cfp/staff/volunteer_details.html:25 +#: cfp/models.py:439 cfp/templates/cfp/staff/volunteer_details.html:25 #: cfp/templates/cfp/staff/volunteer_list.html:32 msgid "Activities" msgstr "Activités" @@ -811,11 +820,6 @@ msgstr "responsable" msgid "No tracks." msgstr "Aucune session." -#: cfp/templates/cfp/staff/volunteer_details.html:11 -#: cfp/templates/cfp/staff/volunteer_list.html:30 -msgid "Email" -msgstr "E-mail" - #: cfp/templates/cfp/staff/volunteer_details.html:29 msgid "The volunteer applied for following activities:" msgstr "Le bénévole s'est proposé pour les activités suivantes :"