POC Campus Condorcet : refonte du formulaire

This commit is contained in:
Paul Marillonnet 2017-05-23 16:27:32 +02:00
parent e970fa15f5
commit 91be3f9d47
3 changed files with 83 additions and 98 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-17 08:44+0000\n"
"POT-Creation-Date: 2017-05-23 14:13+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -19,68 +19,52 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: saml/forms.py:7
msgid "Student"
msgstr ""
msgid "Researcher"
msgstr "Chercheur"
#: saml/forms.py:8
msgid "Faculty"
msgstr ""
msgid "Teacher"
msgstr "Enseignant"
#: saml/forms.py:9
msgid "Staff"
msgstr ""
msgid "Emeritus"
msgstr "Enseignant émérite"
#: saml/forms.py:10
msgid "Employee"
msgstr ""
msgid "Student"
msgstr "Etudiant"
#: saml/forms.py:11
msgid "Member"
msgstr ""
msgid "Staff"
msgstr "BIATOS (ou assimilé)"
#: saml/forms.py:12
msgid "Affiliate"
msgstr ""
#: saml/forms.py:13
msgid "Alum"
msgstr ""
#: saml/forms.py:14
msgid "Library-walk-in"
msgstr ""
#: saml/forms.py:15
msgid "Retired"
msgstr ""
#: saml/forms.py:16
msgid "Researcher"
msgstr ""
#: saml/forms.py:17
msgid "Emeritus"
msgstr ""
#: saml/forms.py:18
msgid "Teacher"
msgstr ""
#: saml/forms.py:19
msgid "Registered-reader"
msgstr ""
msgstr "Lecteur inscrit"
#: saml/forms.py:44
#: saml/forms.py:24
msgid "ASSOCIATE TEACHER"
msgstr "PROFESSEUR ASSOCIE"
#: saml/forms.py:25
msgid "UNIVERSITY TEACHER"
msgstr "PROFESSEUR DES UNIVERSITES"
#: saml/forms.py:26
msgid "UNIVSERITY LECTURER"
msgstr "MAITRE DE CONFERENCE DES UNIVERSITES"
#: saml/forms.py:44 saml/forms.py:71
msgid "Last name"
msgstr "Nom"
#: saml/forms.py:45
#: saml/forms.py:45 saml/forms.py:70
msgid "First name"
msgstr "Prénom"
#: saml/forms.py:46
msgid "Email address"
msgstr "Courriel"
msgstr "Adresse électronique"
#: saml/forms.py:53
msgid "Primary affiliation"
@ -90,9 +74,9 @@ msgstr "Affiliation principale"
msgid "Affiliations"
msgstr "Affiliations"
#: saml/forms.py:59
msgid "Source institution"
msgstr "Établissement d'origine"
#: saml/forms.py:59 saml/forms.py:74
msgid "Institution"
msgstr "Établissement"
#: saml/forms.py:62
msgid "Primary assignment unit"
@ -104,43 +88,31 @@ msgstr "Affectations"
#: saml/forms.py:66
msgid "Source entity"
msgstr "Corps d'appartenance"
msgstr "Fonction"
#: saml/forms.py:67
msgid "Unlist contact information"
msgstr "Liste rouge"
#: saml/forms.py:70
msgid "Host's first name"
msgstr "Prénom de la personne invitante"
#: saml/forms.py:71
msgid "Host's last name"
msgstr "Nom de la personne invitante"
#: saml/forms.py:74
msgid "Host institution"
msgstr "Établissement invitant"
msgstr "Masquer mes coordonnées"
#: saml/forms.py:77
msgid "Host entity or unit"
msgstr "Unité invitante"
msgid "Entity or unit"
msgstr "Unité"
#: saml/utils.py:64 saml/utils.py:81
msgid "No description"
msgstr "Pas de description"
#: saml/views.py:31
#: saml/views.py:35
msgid ""
"Your account has already been registered to the Campus Condorcet account "
"base."
msgstr "Votre compte est déjà créé dans la base du Campus Condorcet."
#: saml/views.py:38
#: saml/views.py:42
msgid "Your account creation request has been sent."
msgstr "Votre demande de création de compte a bien été prise en compte."
#: saml/views.py:53
#: saml/views.py:57
msgid ""
"Please check the entries below, fill in the empty fields and submit your "
"account request"
@ -148,7 +120,7 @@ msgstr ""
"Veuillez confirmer les éléments ci-dessous, compléter les champs vides et "
"valider votre demande d'inscription."
#: saml/views.py:55
#: saml/views.py:59
msgid "Please fill in the empty fields and submit your account request"
msgstr ""
"Veuillez compléter les champs vides et valider votre demande d'inscription."
@ -161,15 +133,15 @@ msgstr "Français"
msgid "English"
msgstr "Anglais"
#: templates/index.html:18
#: templates/index.html:13
msgid "Welcome to the Campus Condorcet subscription website!"
msgstr "Bienvenue sur le site d'inscription au Campus Condorcet !"
#: templates/index.html:20
#: templates/index.html:15
msgid "Register using your source institution account"
msgstr "Inscription via votre établissement d'appartenance"
#: templates/index.html:21
#: templates/index.html:16
msgid "Register using an empty form"
msgstr "Formulaire libre"
@ -185,13 +157,17 @@ msgstr "Portail"
msgid "Portal Management"
msgstr "Gestion du portail"
#: templates/registration_form.html:11
#: templates/registration_form.html:13
msgid "Guest:"
msgstr "Invité :"
#: templates/registration_form.html:24
#: templates/registration_form.html:23
msgid "Host:"
msgstr "Hôte :"
msgstr "Invitant :"
#: templates/registration_form.html:28
msgid "Submit"
msgstr "Soumettre"
#: templates/root.html:28
msgid ""
@ -205,6 +181,15 @@ msgid ""
" "
msgstr ""
#~ msgid "Source institution"
#~ msgstr "Établissement"
#~ msgid "Host's first name"
#~ msgstr "Prénom de la personne invitante"
#~ msgid "Host's last name"
#~ msgstr "Nom de la personne invitante"
#~ msgid "Error while binding to the OpenLDAP server."
#~ msgstr "Erreur de connexion au serveur OpenLDAP"

View File

@ -4,29 +4,29 @@ from .utils import ldap_get_unites, ldap_get_etablissements
AFFILIATION_CHOICES = (
('student', _('Student')),
('faculty', _('Faculty')),
('staff', _('Staff')),
('employee', _('Employee')),
('member', _('Member')),
('affiliate', _('Affiliate')),
('alum', _('Alum')),
('library-walk-in', _('Library-walk-in')),
('retired', _('Retired')),
('researcher', _('Researcher')),
('emeritus', _('Emeritus')),
('teacher', _('Teacher')),
('emeritus', _('Emeritus')),
('student', _('Student')),
('staff', _('Staff')),
('registered-reader', _('Registered-reader')),
)
AFFECTATION_CHOICES = (
('B', 'Bleu'),
('V', 'Vert'),
('B', 'Bleue'),
('V', 'Verte'),
('J', 'Jaune'),
('N', 'Noir'),
('N', 'Noire'),
('R', 'Rouge'),
)
EMP_CORPS_CHOICES = (
('PROFESSEUR ASSOCIE', _('ASSOCIATE TEACHER')),
('PROFESSEUR DES UNIVERSITES', _('UNIVERSITY TEACHER')),
('MAITRE DE CONFERENCES DES UNIVERSITES', _('UNIVSERITY LECTURER')),
)
ETABLISSEMENT_CHOICES = ()
UNITE_CHOICES = ()
@ -47,7 +47,9 @@ class RegistrationForm(forms.Form):
# Attributes from the Internet2 eduPerson and RENATER SupAnn2009 specifications.
# ep_* -> eduPerson attributes:
ep_principal_name = forms.CharField(max_length=100, label="eduPersonPrincipalName")
ep_principal_name = forms.CharField(required=False,
max_length=100,
label="eduPersonPrincipalName")
ep_primary_affiliation = forms.ChoiceField(required=False,
choices=AFFILIATION_CHOICES,
label=_("Primary affiliation")) # eduPersonPrimaryAffiliation
@ -56,25 +58,25 @@ class RegistrationForm(forms.Form):
label=_("Affiliations")) # eduPersonPrimaryAffiliation
# s_* -> supannPerson attributes:
s_etablissement = forms.CharField(max_length=100, label=_("Source institution")) # supannEtablissement
s_etablissement = forms.CharField(max_length=100, label=_("Institution")) # supannEtablissement
s_entite_affectation_principale = forms.ChoiceField(required=False,
choices=AFFECTATION_CHOICES,
label=_("Primary assignment unit")) # supannEntiteAffectationPrincipale
s_entite_affectation = forms.MultipleChoiceField(required=False,
choices=AFFECTATION_CHOICES,
label=_("Assignment units")) # supannEntiteAffectation
s_emp_corps = forms.CharField(max_length=100, label=_("Source entity")) # supannEmpCorps
s_emp_corps = forms.ChoiceField(choices=EMP_CORPS_CHOICES, label=_("Source entity")) # supannEmpCorps
s_liste_rouge = forms.BooleanField(initial=True, required=False, label=_("Unlist contact information")) # supannListeRouge
# hote_* -> host attributes:
hote_prenom = forms.CharField(max_length=100, label=_("Host's first name"))
hote_nom = forms.CharField(max_length=100, label=_("Host's last name"))
hote_prenom = forms.CharField(max_length=100, label=_("First name"))
hote_nom = forms.CharField(max_length=100, label=_("Last name"))
hote_etablissement = forms.ChoiceField(required=False,
choices=ldap_get_etablissements(),
label=_("Host institution"))
label=_("Institution"))
hote_unite = forms.ChoiceField(required=False,
choices=ldap_get_unites(),
label=_("Host entity or unit"))
label=_("Entity or unit"))
class Meta:
widgets= {'form' : forms.HiddenInput()}

View File

@ -11,24 +11,22 @@
<form action="{% url "register" %}" method="post">
{% csrf_token %}
<h2>{% trans "Guest:" %}</h2>
{% include "registration_field.html" with field=form.prenom %}
{% include "registration_field.html" with field=form.nom %}
{% include "registration_field.html" with field=form.prenom %}
{% include "registration_field.html" with field=form.email %}
{% include "registration_field.html" with field=form.ep_principal_name %}
{% include "registration_field.html" with field=form.ep_primary_affiliation %}
{% include "registration_field.html" with field=form.ep_affiliation %}
{% include "registration_field.html" with field=form.s_etablissement %}
{% include "registration_field.html" with field=form.ep_primary_affiliation %}
{% include "registration_field.html" with field=form.s_entite_affectation_principale %}
{% include "registration_field.html" with field=form.s_entite_affectation %}
{% include "registration_field.html" with field=form.s_emp_corps %}
{% include "registration_field.html" with field=form.s_liste_rouge %}
</p>
<h2>{% trans "Host:" %}</h2>
{% include "registration_field.html" with field=form.hote_prenom %}
{% include "registration_field.html" with field=form.hote_nom %}
{% include "registration_field.html" with field=form.hote_prenom %}
{% include "registration_field.html" with field=form.hote_etablissement %}
{% include "registration_field.html" with field=form.hote_unite %}
<input type="submit" value="Submit" />
<input type="submit" value="{% trans "Submit" %}"/>
</form>
</div>
<div id="padding-right">&nbsp;</div>