Version plus ou moins stable de chercheurs
[auf_savoirs_en_partage_django.git] / auf_savoirs_en_partage / chercheurs / forms.py
CommitLineData
932eef9a
AJ
1# -*- encoding: utf-8 -*-
2from django import forms
3from models import *
4
13146d99 5
932eef9a 6class PersonneForm(forms.ModelForm):
5ecd9e43 7 password = forms.CharField(widget=forms.PasswordInput(), label="Mot de passe")
932eef9a 8 class Meta:
dab519fa
AJ
9 model = Utilisateur
10 fields = ('nom', 'prenom', 'courriel', 'password', 'genre')
5ecd9e43 11
932eef9a
AJ
12
13class ChercheurForm(forms.ModelForm):
14 class Meta:
15 model = Chercheur
00755d9b 16 fields = ('nationalite', 'groupes')
7c596de2 17
00755d9b
AJ
18class PublicationForm(forms.ModelForm):
19 class Meta:
20 model = Publication
dab519fa 21
7c596de2
AJ
22class EtablissementForm(forms.ModelForm):
23 class Meta:
24 model = Chercheur
25 fields = ('etablissement',)
26
00755d9b
AJ
27class EtablissementAutreForm(forms.ModelForm):
28 class Meta:
29 model = Chercheur
30 fields = ('etablissement_autre_nom', 'etablissement_autre_pays', )
31
7c596de2
AJ
32class DisciplineForm(forms.ModelForm):
33 class Meta:
34 model = Chercheur
5ecd9e43 35 fields = ('discipline', 'expertise', 'mots_cles', 'url_site_web', 'url_blog', 'url_facebook', 'url_linkedin')
13146d99 36
b3e1079e
AJ
37class PersonneEditForm(forms.ModelForm):
38 class Meta:
39 model = Personne
40 fields = ('nom', 'prenom', 'genre')
41
13146d99
AJ
42
43class RepertoireSearchForm (forms.Form):
44 mots_cles = forms.CharField (required = False, label="Mots-clés")
45 discipline = forms.ModelChoiceField(queryset=Discipline.objects.all(), required=False, label="Champ disciplinaire", empty_label="Tous")
46 fonction = forms.ChoiceField(choices=(('','Tous'),)+FONCTION_CHOICES, required=False, label="Fonction")
47 pays = forms.ModelChoiceField(queryset=Pays.objects.all().order_by("nom"), required=False, label="Localisation", empty_label="Tous")
48 genre = forms.ChoiceField(choices=(('','Tous'),)+GENRE_CHOICES, required=False, label="Sexe")