8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-27 07:02:26 +00:00

fix bug with shell field for self registration

This commit is contained in:
Laouen Fernet 2018-08-23 15:38:36 +02:00
parent aa2d6365e7
commit d574194ed7
3 changed files with 30 additions and 29 deletions

View file

@ -316,8 +316,9 @@ class AdherentForm(FormRevMixin, FieldPermissionFormMixin, ModelForm):
self.fields['room'].label = _("Room") self.fields['room'].label = _("Room")
self.fields['room'].empty_label = _("No room") self.fields['room'].empty_label = _("No room")
self.fields['school'].empty_label = _("Select a school") self.fields['school'].empty_label = _("Select a school")
self.fields['shell'].empty_label = _("Default shell")
self.fields['gpg_fingerprint'].widget.attrs['placeholder'] = _("Leave empty if you don't have any GPG key.") self.fields['gpg_fingerprint'].widget.attrs['placeholder'] = _("Leave empty if you don't have any GPG key.")
if 'shell' in self.fields:
self.fields['shell'].empty_label = _("Default shell")
def clean_email(self): def clean_email(self):
if not OptionalUser.objects.first().local_email_domain in self.cleaned_data.get('email'): if not OptionalUser.objects.first().local_email_domain in self.cleaned_data.get('email'):

View file

@ -21,7 +21,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 2.5\n" "Project-Id-Version: 2.5\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-08-23 15:10+0200\n" "POT-Creation-Date: 2018-08-23 15:36+0200\n"
"PO-Revision-Date: 2018-06-27 23:35+0200\n" "PO-Revision-Date: 2018-06-27 23:35+0200\n"
"Last-Translator: Laouen Fernet <laouen.fernet@supelec.fr>\n" "Last-Translator: Laouen Fernet <laouen.fernet@supelec.fr>\n"
"Language-Team: \n" "Language-Team: \n"
@ -39,7 +39,7 @@ msgstr "Vous n'avez pas le droit de voir cette application."
msgid "Current password" msgid "Current password"
msgstr "Mot de passe actuel" msgstr "Mot de passe actuel"
#: forms.py:75 forms.py:446 #: forms.py:75 forms.py:447
msgid "New password" msgid "New password"
msgstr "Nouveau mot de passe" msgstr "Nouveau mot de passe"
@ -109,104 +109,104 @@ msgstr "Nom"
msgid "Email address" msgid "Email address"
msgstr "Adresse mail" msgstr "Adresse mail"
#: forms.py:314 forms.py:384 forms.py:515 templates/users/aff_schools.html:37 #: forms.py:314 forms.py:385 forms.py:516 templates/users/aff_schools.html:37
#: templates/users/profil.html:181 #: templates/users/profil.html:181
msgid "School" msgid "School"
msgstr "Établissement" msgstr "Établissement"
#: forms.py:315 forms.py:385 models.py:1204 #: forms.py:315 forms.py:386 models.py:1204
#: templates/users/aff_serviceusers.html:34 templates/users/profil.html:183 #: templates/users/aff_serviceusers.html:34 templates/users/profil.html:183
msgid "Comment" msgid "Comment"
msgstr "Commentaire" msgstr "Commentaire"
#: forms.py:316 forms.py:386 templates/users/aff_clubs.html:40 #: forms.py:316 forms.py:387 templates/users/aff_clubs.html:40
#: templates/users/aff_users.html:41 templates/users/profil.html:175 #: templates/users/aff_users.html:41 templates/users/profil.html:175
msgid "Room" msgid "Room"
msgstr "Chambre" msgstr "Chambre"
#: forms.py:317 forms.py:387 #: forms.py:317 forms.py:388
msgid "No room" msgid "No room"
msgstr "Pas de chambre" msgstr "Pas de chambre"
#: forms.py:318 forms.py:388 #: forms.py:318 forms.py:389
msgid "Select a school" msgid "Select a school"
msgstr "Sélectionnez un établissement" msgstr "Sélectionnez un établissement"
#: forms.py:319 #: forms.py:319
msgid "Default shell"
msgstr "Interface système par défaut"
#: forms.py:320
msgid "Leave empty if you don't have any GPG key." msgid "Leave empty if you don't have any GPG key."
msgstr "Laissez vide si vous n'avez pas de clé GPG." msgstr "Laissez vide si vous n'avez pas de clé GPG."
#: forms.py:327 forms.py:655 #: forms.py:321
msgid "Default shell"
msgstr "Interface système par défaut"
#: forms.py:328 forms.py:656
msgid "You can't use a {} address." msgid "You can't use a {} address."
msgstr "Vous ne pouvez pas utiliser une adresse {}." msgstr "Vous ne pouvez pas utiliser une adresse {}."
#: forms.py:352 forms.py:410 #: forms.py:353 forms.py:411
msgid "A valid telephone number is required." msgid "A valid telephone number is required."
msgstr "Un numéro de téléphone valide est requis." msgstr "Un numéro de téléphone valide est requis."
#: forms.py:363 #: forms.py:364
msgid "Force the move?" msgid "Force the move?"
msgstr "Forcer le déménagement ?" msgstr "Forcer le déménagement ?"
#: forms.py:383 templates/users/aff_clubs.html:36 #: forms.py:384 templates/users/aff_clubs.html:36
#: templates/users/aff_serviceusers.html:32 #: templates/users/aff_serviceusers.html:32
msgid "Name" msgid "Name"
msgstr "Nom" msgstr "Nom"
#: forms.py:389 #: forms.py:390
msgid "Use a mailing list" msgid "Use a mailing list"
msgstr "Utiliser une liste de diffusion" msgstr "Utiliser une liste de diffusion"
#: forms.py:503 templates/users/aff_listright.html:38 #: forms.py:504 templates/users/aff_listright.html:38
msgid "Superuser" msgid "Superuser"
msgstr "Superutilisateur" msgstr "Superutilisateur"
#: forms.py:527 #: forms.py:528
msgid "Shell name" msgid "Shell name"
msgstr "Nom de l'interface système" msgstr "Nom de l'interface système"
#: forms.py:546 #: forms.py:547
msgid "Name of the group of rights" msgid "Name of the group of rights"
msgstr "Nom du groupe de droits" msgstr "Nom du groupe de droits"
#: forms.py:557 #: forms.py:558
msgid "GID. Warning: this field must not be edited after creation." msgid "GID. Warning: this field must not be edited after creation."
msgstr "GID. Attention : ce champ ne doit pas être modifié après création." msgstr "GID. Attention : ce champ ne doit pas être modifié après création."
#: forms.py:565 #: forms.py:566
msgid "Current groups of rights" msgid "Current groups of rights"
msgstr "Groupes de droits actuels" msgstr "Groupes de droits actuels"
#: forms.py:582 #: forms.py:583
msgid "Current schools" msgid "Current schools"
msgstr "Établissements actuels" msgstr "Établissements actuels"
#: forms.py:600 forms.py:614 templates/users/aff_bans.html:41 #: forms.py:601 forms.py:615 templates/users/aff_bans.html:41
#: templates/users/aff_whitelists.html:41 #: templates/users/aff_whitelists.html:41
msgid "End date" msgid "End date"
msgstr "Date de fin" msgstr "Date de fin"
#: forms.py:628 models.py:1748 #: forms.py:629 models.py:1748
msgid "Local part of the email address" msgid "Local part of the email address"
msgstr "Partie locale de l'adresse mail" msgstr "Partie locale de l'adresse mail"
#: forms.py:629 #: forms.py:630
msgid "Can't contain @" msgid "Can't contain @"
msgstr "Ne peut pas contenir @" msgstr "Ne peut pas contenir @"
#: forms.py:644 #: forms.py:645
msgid "Main email address" msgid "Main email address"
msgstr "Adresse mail principale" msgstr "Adresse mail principale"
#: forms.py:646 #: forms.py:647
msgid "Redirect local emails" msgid "Redirect local emails"
msgstr "Rediriger les mails locaux" msgstr "Rediriger les mails locaux"
#: forms.py:648 #: forms.py:649
msgid "Use local emails" msgid "Use local emails"
msgstr "Utiliser les mails locaux" msgstr "Utiliser les mails locaux"