--- /dev/null
+# -*- encoding: utf-8 -*-
+
+import os
+from django import forms
+from django.contrib import admin
+from django.forms.models import inlineformset_factory
+#from form_utils.forms import BetterModelForm
+from django.forms import ModelForm
+from models import *
+
+################################################################################
+# EVALUATION
+################################################################################
+class CandidatEvaluationForm(ModelForm):
+ def __init__(self, *args, **kwargs):
+ self.candidat = kwargs.pop('candidat')
+ super(CandidatEvaluationForm, self).__init__(*args, **kwargs)
+
+ def save(self):
+ super(CandidatEvaluationForm, self).save()
+
+ class Meta:
+ fields = ('note', 'commentaire', 'evaluateur')
+ model = CandidatEvaluation
+
+class EvaluateurForm(forms.Form):
+ evaluateurs = forms.ModelMultipleChoiceField(queryset=Evaluateur.objects.all())
+
+ def __init__(self, *args, **kwargs):
+ self.candidats = kwargs.pop('candidats')
+ super(EvaluateurForm, self).__init__(*args, **kwargs)
+
+ def save(self):
+ for d in self.candidats:
+ d.evaluateurs = self.cleaned_data.get('evaluateurs', [])
+ d.save()
+
+################################################################################
+# OFFRE EMPLOI
+################################################################################
+class PostulerOffreEmploiForm(ModelForm):
+ class Meta:
+ fields = ('note', 'commentaire', 'evaluateur')
+ model = OffreEmploi
--- /dev/null
+{% extends 'base.html' %}
+
+{% block title %}RH{% endblock %}
+{% block titre %}Ressources humaines{% endblock %}
+{% block sous_titre %}Accueil{% endblock %}
+
+{% block main %}
+
+
+<div id="content-main">
+ {% block object-tools %}{% endblock %}
+
+
+
+ <div class="module">
+ <h2>Affectation évaluateurs</h2>
+ </div>
+ <form action="" method="post">
+ {{ form.as_p }}
+ <div class="submit-row">
+ <input type="submit" name="_save" class="default" value="Enregistrer">
+ </div>
+ </form>
+
+
+
+</div>
+
+{% endblock %}
--- /dev/null
+{% extends 'base.html' %}
+
+{% block title %}RH{% endblock %}
+{% block titre %}Ressources humaines{% endblock %}
+{% block sous_titre %}Accueil{% endblock %}
+
+{% block main %}
+
+
+<div id="content-main">
+ {% block object-tools %}{% endblock %}
+
+
+
+ <div class="module">
+ <h2>Noter et commenter un candidat</h2>
+ </div>
+ <form action="" method="post">
+ {{ form.as_p }}
+ <div class="submit-row">
+ <input type="submit" name="_save" class="default" value="Enregistrer">
+ </div>
+ </form>
+
+
+
+</div>
+
+{% endblock %}