diff --git a/portail/forms.py b/portail/forms.py index 32ddf073..18418e91 100644 --- a/portail/forms.py +++ b/portail/forms.py @@ -57,6 +57,8 @@ class AdherentForm(UserCreationForm): _("General Terms of Use"), ) ) + self.fields["room"].empty_label = _("No room") + self.fields["school"].empty_label = _("Select a school") class Meta: model = Adherent @@ -76,6 +78,8 @@ class AdherentForm(UserCreationForm): class MembershipForm(forms.Form): payment_method = forms.ModelChoiceField( Paiement.objects.filter(available_for_everyone=True), + label=_("Payment method"), + empty_label=_("Select a payment method"), ) article = forms.ModelChoiceField( @@ -84,4 +88,6 @@ class MembershipForm(forms.Form): | Q(duration_membership__gt=0) | Q(duration_days_membership__gt=0), available_for_everyone=True), + label=_("Article"), + empty_label=_("Select an article"), ) diff --git a/portail/locale/fr/LC_MESSAGES/django.po b/portail/locale/fr/LC_MESSAGES/django.po index 0b7ccf27..37f53a04 100644 --- a/portail/locale/fr/LC_MESSAGES/django.po +++ b/portail/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: 2021-02-01 04:32+0100\n" +"POT-Creation-Date: 2021-02-01 12:03+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,11 +18,11 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: forms.py:35 +#: forms.py:36 msgid "I certify that I have not had an account before." msgstr "Je certifie sur l'honneur ne pas déjà avoir de compte." -#: forms.py:37 +#: forms.py:38 msgid "" "If you already have an account, please use it. If your lost access to it, " "please consider using the forgotten password button on the login page or " @@ -33,6 +33,38 @@ msgstr "" "passe oublié est à votre disposition. Si vous avez oublié votre login, " "contactez le support." +#: forms.py:55 +msgid "I commit to accept the" +msgstr "J'accepte les" + +#: forms.py:57 +msgid "General Terms of Use" +msgstr "Conditions Générales d'Utilisation" + +#: forms.py:60 +msgid "No room" +msgstr "Pas de chambre" + +#: forms.py:61 +msgid "Select a school" +msgstr "Sélectionnez une école" + +#: forms.py:81 +msgid "Payment method" +msgstr "Moyen de paiement" + +#: forms.py:82 +msgid "Select a payment method" +msgstr "Sélectionnez un moyen de paiement" + +#: forms.py:91 +msgid "Article" +msgstr "Article" + +#: forms.py:92 +msgid "Select an article" +msgstr "Sélectionnez un article" + #: templates/portail/index.html:29 #, python-format msgid "Welcome onto the captive portal of %(asso_name)s!" diff --git a/users/models.py b/users/models.py index befcd8bc..6eaa921c 100755 --- a/users/models.py +++ b/users/models.py @@ -239,17 +239,19 @@ class User( (2, _("Waiting for email confirmation")), ) - surname = models.CharField(max_length=255) + surname = models.CharField(max_length=255, verbose_name=_("Surname")) pseudo = models.CharField( max_length=32, unique=True, help_text=_("Must only contain letters, numerals or dashes."), validators=[linux_user_validator], + verbose_name=_("Pseudo"), ) email = models.EmailField( blank=True, default="", help_text=_("External email address allowing us to contact you."), + verbose_name=_("Email"), ) local_email_redirect = models.BooleanField( default=False, @@ -267,7 +269,8 @@ class User( on_delete=models.PROTECT, null=True, blank=True, - help_text=_("Education institute.") + help_text=_("Education institute."), + verbose_name=_("School"), ) shell = models.ForeignKey( "ListShell", @@ -287,7 +290,7 @@ class User( ) email_state = models.IntegerField(choices=EMAIL_STATES, default=EMAIL_STATE_PENDING) registered = models.DateTimeField(auto_now_add=True) - telephone = models.CharField(max_length=15, blank=True, null=True) + telephone = models.CharField(max_length=15, blank=True, null=True, verbose_name=_("Telephone number")) uid_number = models.PositiveIntegerField(default=get_fresh_user_uid, unique=True) legacy_uid = models.PositiveIntegerField( unique=True, @@ -1875,11 +1878,23 @@ class Adherent(User): """ - name = models.CharField(max_length=255) - room = models.OneToOneField( - "topologie.Room", on_delete=models.PROTECT, blank=True, null=True + name = models.CharField( + max_length=255, + verbose_name=_("First name"), + ) + room = models.OneToOneField( + "topologie.Room", + on_delete=models.PROTECT, + blank=True, + null=True, + verbose_name=_("room"), + ) + gpg_fingerprint = models.CharField( + max_length=49, + blank=True, + null=True, + verbose_name=_("GPG fingerprint"), ) - gpg_fingerprint = models.CharField(max_length=49, blank=True, null=True) class Meta(User.Meta): verbose_name = _("member")