Skip to content
Snippets Groups Projects
Commit e7a8123d authored by nicrausaz's avatar nicrausaz
Browse files

update school & pro

parent 2b57edec
No related branches found
No related tags found
No related merge requests found
......@@ -27,9 +27,6 @@
echo "editing applicant" . $_SESSION['current_post']['applicant_id'];
$current_post = $_SESSION['current_post'];
echo $current_post['applicant_guest_sciper'];
echo "<pre>";
print_r($current_post);
echo "</pre>";
}
?>
<main id="main" role="main" class="content container-grid">
......
......@@ -3,6 +3,9 @@ $(document).ready(function () {
if (location.search == "?edit") {
// showPolyAndInfoDivs();
$("#all").show();
initButtonsAction();
initAddChildButtons();
checkRequired();
}
else if (location.pathname.split("/").slice(-1)[0] == "form.php") {
initJobChange();
......
<?php
$proactivities = getProActivitiesById($pdo, $current_post['applicant_id']);
?>
<table id="activites">
<tr>
<th>Employeur</th>
<th>Lieu</th>
<th>Activité</th>
<th>Années</th>
</tr>
<?php foreach ($proactivities as $key => $activity) { $i = $key + 1; ?>
<tr>
<td>
<input type="text" name="employeurPro<?= $i ?>" placeholder="Employeur" class="form-control" value="<?php echo $activity['professional_activity_company'] != '' ? $activity['professional_activity_company'] : ''; ?>" data-required/>
</td>
<td>
<input type="text" name="lieuPro<?= $i ?>" placeholder="Lieu" class="form-control" value="<?php echo $activity['professional_activity_location'] != '' ? $activity['professional_activity_location'] : ''; ?>" data-required/>
</td>
<td>
<input type="text" name="activitePro<?= $i ?>" placeholder="Activité" class="form-control" value="<?php echo $activity['professional_activity_activity'] != '' ? $activity['professional_activity_activity'] : ''; ?>" data-required/>
</td>
<td>
<input type="text" name="anneesPro<?= $i ?>" placeholder="de-à (années)" class="form-control" value="<?php echo $activity['professional_activity_years'] != '' ? $activity['professional_activity_years'] : ''; ?>" data-required/>
</td>
</tr>
<?php } ?>
</table>
<button type="button" class="btn btn-primary btn-sm mt-3 mb-2" id="addPro">Ajouter une ligne</button>
\ No newline at end of file
<?php
$scolarites = getScolaritiesById($pdo, $current_post['applicant_id']);
?>
<table id="scolaire">
<tr>
<th>Ecole</th>
<th>Lieu</th>
<th>Niveau</th>
<th>Années</th>
</tr>
<?php foreach ($scolarites as $key => $scolarity) { $i = $key + 1; ?>
<tr>
<td>
<input type="text" name="ecole<?= $i ?>" placeholder="Ecole *" class="form-control" value="<?php echo $scolarity['scolarity_school'] != '' ? $scolarity['scolarity_school'] : ''; ?>" data-required/>
</td>
<td>
<input type="text" name="lieuEcole<?= $i ?>" placeholder="Lieu *" class="form-control" value="<?php echo $scolarity['scolarity_location'] != '' ? $scolarity['scolarity_location'] : ''; ?>" data-required/>
</td>
<td>
<input type="text" name="niveauEcole<?= $i ?>" placeholder="Niveau *" class="form-control" value="<?php echo $scolarity['scolarity_level'] != '' ? $scolarity['scolarity_level'] : ''; ?>" data-required/>
</td>
<td>
<input type="text" name="anneesEcole<?= $i ?>" placeholder="de-à (années) *" class="form-control" value="<?php echo $scolarity['scolarity_years'] != '' ? $scolarity['scolarity_years'] : ''; ?>" data-required/>
</td>
</tr>
<?php } ?>
</table>
<!-- TODO: check ça passe de 3 a 5 -->
<button type="button" class="btn btn-primary btn-sm mt-3 mb-2" id="addSch">Ajouter une ligne</button>
<div class="form-group mt-3">
<label for="anneeFin">Année de fin de scolarité*</label>
<input type="text" name="anneeFin" id="anneeFin" class="form-control" placeholder="Année de fin de scolarité" value="<?php echo $current_post['applicant_scolarity_end'] != '' ? $current_post['applicant_scolarity_end'] : ''; ?>" maxlength="4" data-required/>
<small id="anneeFinError" class="error form-text text-muted"></small>
</div>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment