From fd2f426f559d758d82c6283ddf059637a3d5456b Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Thu, 6 Aug 2020 19:56:37 +0200 Subject: [PATCH] :bug: Fix signup --- apps/member/forms.py | 2 ++ apps/member/models.py | 2 +- locale/de/LC_MESSAGES/django.po | 30 +++++++++++++++++------------- locale/fr/LC_MESSAGES/django.po | 30 +++++++++++++++++------------- 4 files changed, 37 insertions(+), 27 deletions(-) diff --git a/apps/member/forms.py b/apps/member/forms.py index c8e405ac..2934bbee 100644 --- a/apps/member/forms.py +++ b/apps/member/forms.py @@ -37,6 +37,8 @@ class ProfileForm(forms.ModelForm): """ A form for the extras field provided by the :model:`member.Profile` model. """ + report_frequency = forms.IntegerField(required=False, initial=0, label=_("Report frequency")) + last_report = forms.DateField(required=False, disabled=True, label=_("Last report date")) def save(self, commit=True): diff --git a/apps/member/models.py b/apps/member/models.py index 90117f35..cdcb6af2 100644 --- a/apps/member/models.py +++ b/apps/member/models.py @@ -99,7 +99,7 @@ class Profile(models.Model): last_report = models.DateField( verbose_name=_("last report date"), - default=timezone.now, + default=timezone.now().date(), ) email_confirmed = models.BooleanField( diff --git a/locale/de/LC_MESSAGES/django.po b/locale/de/LC_MESSAGES/django.po index d54f1006..8698220f 100644 --- a/locale/de/LC_MESSAGES/django.po +++ b/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-06 17:40+0200\n" +"POT-Creation-Date: 2020-08-06 19:55+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -198,13 +198,13 @@ msgstr "" msgid "Type" msgstr "" -#: apps/activity/tables.py:81 apps/member/forms.py:104 +#: apps/activity/tables.py:81 apps/member/forms.py:106 #: apps/registration/forms.py:70 apps/treasury/forms.py:130 #: apps/wei/forms/registration.py:94 msgid "Last name" msgstr "" -#: apps/activity/tables.py:83 apps/member/forms.py:109 +#: apps/activity/tables.py:83 apps/member/forms.py:111 #: apps/registration/forms.py:75 apps/treasury/forms.py:132 #: apps/wei/forms/registration.py:99 templates/note/transaction_form.html:131 msgid "First name" @@ -327,52 +327,56 @@ msgid "member" msgstr "" #: apps/member/forms.py:40 +msgid "Report frequency" +msgstr "" + +#: apps/member/forms.py:42 msgid "Last report date" msgstr "" -#: apps/member/forms.py:60 apps/member/views.py:86 +#: apps/member/forms.py:62 apps/member/views.py:86 #: apps/registration/forms.py:28 msgid "An alias with a similar name already exists." msgstr "" -#: apps/member/forms.py:83 apps/registration/forms.py:50 +#: apps/member/forms.py:85 apps/registration/forms.py:50 msgid "Inscription paid by Société Générale" msgstr "" -#: apps/member/forms.py:85 apps/registration/forms.py:52 +#: apps/member/forms.py:87 apps/registration/forms.py:52 msgid "Check this case is the Société Générale paid the inscription." msgstr "" -#: apps/member/forms.py:90 apps/registration/forms.py:57 +#: apps/member/forms.py:92 apps/registration/forms.py:57 #: apps/wei/forms/registration.py:81 msgid "Credit type" msgstr "" -#: apps/member/forms.py:91 apps/registration/forms.py:58 +#: apps/member/forms.py:93 apps/registration/forms.py:58 #: apps/wei/forms/registration.py:82 msgid "No credit" msgstr "" -#: apps/member/forms.py:93 +#: apps/member/forms.py:95 msgid "You can credit the note of the user." msgstr "" -#: apps/member/forms.py:97 apps/registration/forms.py:63 +#: apps/member/forms.py:99 apps/registration/forms.py:63 #: apps/wei/forms/registration.py:87 msgid "Credit amount" msgstr "" -#: apps/member/forms.py:114 apps/registration/forms.py:80 +#: apps/member/forms.py:116 apps/registration/forms.py:80 #: apps/treasury/forms.py:134 apps/wei/forms/registration.py:104 #: templates/note/transaction_form.html:137 msgid "Bank" msgstr "" -#: apps/member/forms.py:141 +#: apps/member/forms.py:143 msgid "User" msgstr "" -#: apps/member/forms.py:155 +#: apps/member/forms.py:157 msgid "Roles" msgstr "" diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index e9b09431..517bfeed 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-06 17:40+0200\n" +"POT-Creation-Date: 2020-08-06 19:55+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -199,13 +199,13 @@ msgstr "supprimer" msgid "Type" msgstr "Type" -#: apps/activity/tables.py:81 apps/member/forms.py:104 +#: apps/activity/tables.py:81 apps/member/forms.py:106 #: apps/registration/forms.py:70 apps/treasury/forms.py:130 #: apps/wei/forms/registration.py:94 msgid "Last name" msgstr "Nom de famille" -#: apps/activity/tables.py:83 apps/member/forms.py:109 +#: apps/activity/tables.py:83 apps/member/forms.py:111 #: apps/registration/forms.py:75 apps/treasury/forms.py:132 #: apps/wei/forms/registration.py:99 templates/note/transaction_form.html:131 msgid "First name" @@ -328,52 +328,56 @@ msgid "member" msgstr "adhérent" #: apps/member/forms.py:40 +msgid "Report frequency" +msgstr "Fréquence des rapports (en jours)" + +#: apps/member/forms.py:42 msgid "Last report date" msgstr "Date de dernier rapport" -#: apps/member/forms.py:60 apps/member/views.py:86 +#: apps/member/forms.py:62 apps/member/views.py:86 #: apps/registration/forms.py:28 msgid "An alias with a similar name already exists." msgstr "Un alias avec un nom similaire existe déjà." -#: apps/member/forms.py:83 apps/registration/forms.py:50 +#: apps/member/forms.py:85 apps/registration/forms.py:50 msgid "Inscription paid by Société Générale" msgstr "Inscription payée par la Société générale" -#: apps/member/forms.py:85 apps/registration/forms.py:52 +#: apps/member/forms.py:87 apps/registration/forms.py:52 msgid "Check this case is the Société Générale paid the inscription." msgstr "Cochez cette case si la Société Générale a payé l'inscription." -#: apps/member/forms.py:90 apps/registration/forms.py:57 +#: apps/member/forms.py:92 apps/registration/forms.py:57 #: apps/wei/forms/registration.py:81 msgid "Credit type" msgstr "Type de rechargement" -#: apps/member/forms.py:91 apps/registration/forms.py:58 +#: apps/member/forms.py:93 apps/registration/forms.py:58 #: apps/wei/forms/registration.py:82 msgid "No credit" msgstr "Pas de rechargement" -#: apps/member/forms.py:93 +#: apps/member/forms.py:95 msgid "You can credit the note of the user." msgstr "Vous pouvez créditer la note de l'utisateur avant l'adhésion." -#: apps/member/forms.py:97 apps/registration/forms.py:63 +#: apps/member/forms.py:99 apps/registration/forms.py:63 #: apps/wei/forms/registration.py:87 msgid "Credit amount" msgstr "Montant à créditer" -#: apps/member/forms.py:114 apps/registration/forms.py:80 +#: apps/member/forms.py:116 apps/registration/forms.py:80 #: apps/treasury/forms.py:134 apps/wei/forms/registration.py:104 #: templates/note/transaction_form.html:137 msgid "Bank" msgstr "Banque" -#: apps/member/forms.py:141 +#: apps/member/forms.py:143 msgid "User" msgstr "Utilisateur" -#: apps/member/forms.py:155 +#: apps/member/forms.py:157 msgid "Roles" msgstr "Rôles"