From 50280cae904c59e116039c78b54a07f44a28039c Mon Sep 17 00:00:00 2001 From: Nilovna Bascunan-Vasquez Date: Tue, 19 Jul 2011 12:35:25 -0400 Subject: [PATCH] Retrait de forms non-pertinent dans le package --- auf/django/emploi/forms.py | 37 +++++-------------------------------- 1 file changed, 5 insertions(+), 32 deletions(-) diff --git a/auf/django/emploi/forms.py b/auf/django/emploi/forms.py index 8987fa5..861cb2c 100644 --- a/auf/django/emploi/forms.py +++ b/auf/django/emploi/forms.py @@ -9,14 +9,14 @@ from django.forms import ModelForm from captcha.fields import CaptchaField -from recrutement import models as recr +from auf.django.emploi import models as emploi ################################################################################ # OFFRE EMPLOI ################################################################################ -class CandidatPieceForm(inlineformset_factory(recr.Candidat, - recr.CandidatPiece)): - nom = forms.MultipleChoiceField(choices=recr.TYPE_PIECE_CHOICES, +class CandidatPieceForm(inlineformset_factory(emploi.Candidat, + emploi.CandidatPiece)): + nom = forms.MultipleChoiceField(choices=emploi.TYPE_PIECE_CHOICES, widget=CheckboxSelectMultiple) class PostulerOffreEmploiForm(ModelForm): @@ -35,37 +35,10 @@ class PostulerOffreEmploiForm(ModelForm): return postulation class Meta: - model = recr.Candidat + model = emploi.Candidat exclude = ('actif', 'offre_emploi',) fields = ('nom', 'prenom', 'genre', 'nationalite', 'situation_famille', 'nombre_dependant', 'niveau_diplome', 'employeur_actuel', 'poste_actuel', 'domaine_professionnel', 'telephone', 'email', 'adresse', 'ville', 'code_postal', 'etat_province', 'pays', 'captcha', ) - -# TODO: Vérifier si on garde, pour l'envoi automatique d'un email lors de la -# postulation de l'offre d'emploi -################################################################################ -# TEMPLATE COURRIEL -################################################################################ -class CandidatCourrielTemplateForm(ModelForm): - def get_template(self): - return self.data['template'] - - class Meta: - model = recr.CandidatCourriel - fields = ('template', ) - -class CandidatCourrielForm(ModelForm): - def __init__(self, *args, **kwargs): - self.candidats = kwargs.pop('candidats') - self.template = kwargs.pop('template') - super(CandidatCourrielForm, self).__init__(*args, **kwargs) - - def save(self): - super(CandidatCourrielForm, self).save() - - class Meta: - model = recr.CandidatCourriel - fields = ('sujet', 'plain_text', 'html') - -- 1.7.10.4