1 {% extends 'base.html' %}
4 <script src=
"{{ MEDIA_URL }}js/jquery-1.5.1.min.js"
5 type=
"text/javascript"></script>
13 <h1>Autorisation d'embauche
</h1>
14 <form action=
"" method=
"post">
15 {% if step == 'poste' %}
18 <table cellspacing=
"0">
22 <script type=
"text/javascript">
23 $('#id_poste').change(function() {
24 window.location = '{% url embauche %}/' + $(this).val();
34 <table cellspacing=
"0" id=
"form-employe">
35 {{ forms.employe.as_table }}
38 <input type=
"hidden" id=
"poste" name=
"poste" value=
"dae-{{ poste.id }}" />
39 <input type=
"hidden" id=
"implantation" name=
"implantation"
40 value=
"{{ poste.implantation_id }}" />
42 <script type=
"text/javascript">
43 function activateEmployeDropDown() {
44 $('#id_employe').change(loadEmploye);
47 function loadEmploye() {
48 var employeUrl = '{% url employe %}/' + $(this).val();
49 $('#form-employe').html('
<tr><td>Chargement...
</td></tr>')
50 .load(employeUrl, activateEmployeDropDown);
51 var dossierUrl = '{% url dossier %}/' + $('#poste').val() +
53 $('#form-dossier').html('
<tr><td>Chargement...
</td></tr>')
54 .load(dossierUrl, activateDossierDropDowns);
57 activateEmployeDropDown();
62 <table cellspacing=
"0" id=
"form-dossier">
63 {{ forms.dossier.as_table }}
66 <script type=
"text/javascript">
67 function activateDossierDropDowns() {
68 $('#id_classement, #id_devise').change(loadSalaire);
71 function loadSalaire() {
72 $.getJSON('{% url salaire %}/' + $('#implantation').val() + '/' +
73 $('#id_devise').val() + '/' + $('#id_classement').val(),
76 $('#id_salaire').val(data.salaire_devise);
80 activateDossierDropDowns();
82 <input type=
"submit" name=
"save" value=
"Sauvegarder" />