embauche contrat design done
authordavin baragiotta <davin.baragiotta@u-db.(none)>
Fri, 8 Apr 2011 15:43:42 +0000 (11:43 -0400)
committerDavin BARAGIOTTA <davin.baragiotta@auf.org>
Fri, 8 Apr 2011 15:43:42 +0000 (11:43 -0400)
project/dae/forms.py
project/dae/models.py
project/dae/templates/dae/embauche-dossier.html
project/dae/templates/dae/poste.html

index 44233bd..5d03567 100644 (file)
@@ -181,3 +181,5 @@ class DossierForm(forms.ModelForm):
     """ Formulaire des dossiers. """
     class Meta:
         model = dae.Dossier
+        widgets = dict(statut_residence=forms.RadioSelect(),
+                    )
index 4d4bed8..edf6303 100644 (file)
@@ -83,7 +83,7 @@ class Poste(models.Model):
                                 verbose_name="Nb. heures par semaine")
 
     # Recrutement
-    statut_residence = models.CharField(max_length=10, default='MAD',
+    statut_residence = models.CharField(max_length=10, default='local', 
                                         verbose_name="Statut",
                                         choices=STATUT_RESIDENCE_CHOICES)
     # TODO null?
@@ -298,7 +298,8 @@ class Dossier(models.Model):
 
     # Recrutement
     remplacement = models.BooleanField()
-    statut_residence = models.CharField(max_length=10,
+    statut_residence = models.CharField(max_length=10, default='local', 
+                                        verbose_name="Statut",
                                         choices=STATUT_RESIDENCE_CHOICES)
 
     # Rémunération
@@ -309,14 +310,15 @@ class Dossier(models.Model):
                                   null=True, default=None)
     devise = models.ForeignKey(rh.Devise, related_name='+')
     regime_travail = models.DecimalField(max_digits=12, decimal_places=2,
-                                         verbose_name="Régime de travail")
+                                         verbose_name="Régime de travail",
+                                         help_text="% du temps complet")
     regime_travail_nb_heure_semaine = models.DecimalField(max_digits=12,
-            decimal_places=2, verbose_name="Nbr heures par semaine")
+            decimal_places=2, verbose_name="Nb. heures par semaine")
 
     # Contrat
     type_contrat = models.ForeignKey(rh.TypeContrat, related_name='+')
-    contrat_date_debut = models.DateField()
-    contrat_date_fin = models.DateField()
+    contrat_date_debut = models.DateField(help_text="format: aaaa-mm-jj")
+    contrat_date_fin = models.DateField(help_text="format: aaaa-mm-jj")
 
     # Comptes
     compte_compta = models.CharField(max_length=10,
index f847638..8bba7cc 100644 (file)
     <table>
         <tbody>
         <tr>
-            <th>
-                {{ form.statut.label_tag }}
-            </th>
-            <td>
-                {{ form.statut }}<br />
-                {{ form.statut.errors }}
+            <th>{{ form.type_contrat.label_tag }} :</th>
+            <td colspan="4">
+                {{ form.type_contrat }}<br />
+                {{ form.type_contrat.errors }}
             </td>
-        </tr>
-        <tr>
-            <th>
-                {{ form.organisme_bstg.label_tag }}
-            </th>
-            <td>
-                {{ form.organisme_bstg }}<br />
-                {{ form.organisme_bstg.errors }}
-            </td>
-        </tr>
-        <tr>
-            <th>
-                {{ form.remplacement.label_tag }}
-            </th>
+            <th>{{ form.remplacement.label_tag }} :</th>
             <td>
                 {{ form.remplacement }}<br />
                 {{ form.remplacement.errors }}
             </td>
         </tr>
         <tr>
-            <th>
-                {{ form.statut_residence.label_tag }}
-            </th>
-            <td>
-                {{ form.statut_residence }}<br />
-                {{ form.statut_residence.errors }}
-            </td>
-        </tr>
-        <tr>
-            <th>
-                {{ form.regime_travail.label_tag }}
-            </th>
+            <th rowspan="2">Durée :</th>
+            <td>du</td>
             <td>
-                {{ form.regime_travail }}<br />
-                {{ form.regime_travail.errors }}
+                {{ form.contrat_date_debut }}<br />
+                <span class="info">({{form.contrat_date_debut.help_text }})</span><br />
+                {{ form.contrat_date_debut.errors }}
             </td>
-        </tr>
-        <tr>
-            <th>
-                {{ form.regime_travail_nb_heure_semaine.label_tag }}
-            </th>
+            <td> au </td>
             <td>
-                {{ form.regime_travail_nb_heure_semaine }}<br />
-                {{ form.regime_travail_nb_heure_semaine.errors }}
+                {{ form.contrat_date_fin }}<br />
+                <span class="info">({{form.contrat_date_fin.help_text }})</span><br />
+                {{ form.contrat_date_fin.errors }}
             </td>
-        </tr>
-        <tr>
-            <th>
-                {{ form.type_contrat.label_tag }}
-            </th>
+            <th>{{ form.regime_travail.label_tag }} :<br />{{ form.regime_travail.errors }}</th>
             <td>
-                {{ form.type_contrat }}<br />
-                {{ form.type_contrat.errors }}
+                {{ form.regime_travail }}
+                <span class="info">{{ form.regime_travail.help_text }}</span>
             </td>
         </tr>
         <tr>
-            <th>
-                {{ form.contrat_date_debut.label_tag }}
-            </th>
-            <td>
-                {{ form.contrat_date_debut }}<br />
-                {{ form.contrat_date_debut.errors }}
+            <td colspan="4" class="info">
+                <p>Pour une durée indéterminée, spécifier uniquement la date de début.</p>
             </td>
-        </tr>
-        <tr>
             <th>
-                {{ form.contrat_date_fin.label_tag }}
+                {{ form.regime_travail_nb_heure_semaine.label_tag }} :<br />
+                {{ form.regime_travail_nb_heure_semaine.errors }}
             </th>
+            <td>{{ form.regime_travail_nb_heure_semaine }}</td>
+        </tr>
+        <tr>
+            <th>Statut : </th>
+            <td colspan="4">
+                <span class="row">
+                {{ form.statut }}
+                {{ form.statut_residence }}
+                {% if form.statut.errors %}
+                    <br />
+                    {{ form.statut.errors }}
+                {% endif %}
+                {% if form.statut_residence.errors %}
+                    <br />
+                    {{ form.statut_residence.errors }}
+                {% endif %}
+                </span>
+            </td>
+            <th>{{ form.organisme_bstg.label_tag }} :</th>
             <td>
-                {{ form.contrat_date_fin }}<br />
-                {{ form.contrat_date_fin.errors }}
+                {{ form.organisme_bstg }}
+                {% if form.organisme_bstg.errors %}
+                    <br />
+                    {{ form.organisme_bstg.errors }}
+                {% endif %}
             </td>
         </tr>
         </tbody>
                 {{ form.compte_compta }}<br />
                 {{ form.compte_compta.errors }}
             </td>
-        </tr>
-        <tr>
             <th>
                 {{ form.compte_courriel.label_tag }}
             </th>
index c5b5e23..01f952e 100644 (file)
@@ -115,11 +115,6 @@ Demande d'autorisation d'embauche
                 <span class="info">({{form.date_fin.help_text }})</span><br />
                 {{ form.date_fin.errors }}
             </td>
-        </tr>
-        <tr>
-            <td colspan="4" class="info">Pour une durée indéterminée, spécifier uniquement la date de début.</td>
-        </tr>
-        <tr>
             <th>{{ form.regime_travail.label_tag }} :<br />{{ form.regime_travail.errors }}</th>
             <td colspan="4">
                 {{ form.regime_travail }}
@@ -127,11 +122,14 @@ Demande d'autorisation d'embauche
             </td>
         </tr>
         <tr>
+            <td colspan="4" class="info">
+                <p>Pour une durée indéterminée, spécifier uniquement la date de début.</p>
+            </td>
             <th>
                 {{ form.regime_travail_nb_heure_semaine.label_tag }} :<br />
                 {{ form.regime_travail_nb_heure_semaine.errors }}
             </th>
-            <td colspan="4">{{ form.regime_travail_nb_heure_semaine }}</td>
+            <td>{{ form.regime_travail_nb_heure_semaine }}</td>
         </tr>
         </tbody>
     </table>