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

start form migration

parent d676bc38
No related branches found
No related tags found
No related merge requests found
......@@ -16,66 +16,83 @@
?>
<!doctype html>
<html lang="fr">
<head>
<title>Formulaire Apprentissage</title>
<?php include('templates/head.php'); ?>
</head>
<head>
<title>Formulaire Apprentissage</title>
<?php include('templates/head.php'); ?>
</head>
<body>
<div class="page-style">
<?php include('templates/header.php') ?>
<p class="paracenter">Les champs notés d'un astérisque* doivent être obligatoirement remplis.</p>
<form method="post" action="cible.php" enctype="multipart/form-data">
<fieldset>
<legend><span class="number">1</span> Apprentissage </legend>
<?php include('templates/header.php') ?>
<main id="main" role="main" class="content container-grid">
<h3 class="mb-5">Candidature pour un apprentissage</h3>
<small class="mb-3">Les champs notés d'un * doivent être obligatoirement remplis.</small>
<div id="lieux">
<label for="lieu">Je désire effectuer ma formation à:</label><p>
<dl class="radio-list-left">
<dd>
<input type="radio" name="lieu" id="lieuLausanne" value="Lausanne" <?php echo (!isset($_SESSION['postedForm']['lieu']) || $_SESSION['postedForm']['lieu'] == "Lausanne") ? "checked=\"checked\"" : ''; ?>>
<label for="lieuLausanne">EPFL Lausanne</label>
</dd>
<dd>
<input type="radio" name="lieu" id="lieuSion" value="Sion" <?php echo ($_SESSION['postedForm']['lieu'] == "Sion") ? "checked=\"checked\"" : ''; ?>>
<label for="lieuSion">EPFL Valais Sion</label>
</dd>
</dl>
</div>
<label for="job">Je suis intéressé par la formation de: </label>
<select name="job" id="jbLausanne" class="jobSelectors" data-required>
<option value="menu" selected disabled>Choisir une formation...</option>
<?php
foreach ($LISTJOB['Lausanne'] as $jobKey => $jobVal) {
<form method="post" action="cible.php" enctype="multipart/form-data">
<h3>1. Apprentissage</h3>
<!-- Choix formation -->
<div class="form-group">
<label>Je désire effectuer ma formation à:</label>
<div class="custom-control custom-radio">
<input type="radio" name="lieu" id="lieuLausanne" class="custom-control-input" value="Lausanne" <?php echo (!isset($_SESSION['postedForm']['lieu']) || $_SESSION['postedForm']['lieu'] == "Lausanne") ? "checked=\"checked\"" : ''; ?>>
<label class="custom-control-label" for="lieuLausanne">EPFL Lausanne</label>
</div>
<div class="custom-control custom-radio">
<input type="radio" name="lieu" id="lieuSion" class="custom-control-input" value="Sion" <?php echo ($_SESSION['postedForm']['lieu'] == "Sion") ? "checked=\"checked\"" : ''; ?>>
<label class="custom-control-label" for="lieuSion">EPFL Valais Sion</label>
</div>
</div>
<div class="form-group">
<label>Je suis intéressé par la formation de:</label>
<select name="job" id="jbLausanne" class="custom-select" data-required>
<option selected disabled>Choisir une formation...</option>
<?php
foreach ($LISTJOB['Lausanne'] as $jobKey => $jobVal) {
if ($_SESSION['postedForm']['job'] == $jobKey) {
echo "<option value='$jobKey' selected='selected'>$jobVal</option>";
} else {
echo "<option value='$jobKey'>$jobVal</option>";
}
}
?>
</select>
<select name="job" id="jbSion" class="custom-select" style="display: none;" data-required>
<option value="menu" selected disabled>Choisir une formation...</option>
<?php
foreach ($LISTJOB['Sion'] as $jobKey => $jobVal) {
if ($_SESSION['postedForm']['job'] == $jobKey) {
echo "<option value='$jobKey' selected='selected'>$jobVal</option>";
} else {
echo "<option value='$jobKey'>$jobVal</option>";
}
}
?>
</select>
</div>
<!-- / Choix formation -->
<div id="all" style="display: none;">
<div class="form-group">
<!-- Infos filières informaticien -->
<div id="infoOnly">
<?php include('templates/filieresinfos.php') ?>
</div>
<!-- / Infos filières informaticien -->
<!-- Maturité -->
<div class="custom-control custom-radio">
<input type="radio" name="mpt" id="mpt1" class="custom-control-input" value="false" <?php echo (!isset($_SESSION['postedForm']['mpt']) || $_SESSION['postedForm']['mpt'] == "false") ? "checked=\"checked\"" : ''; ?>>
<label class="custom-control-label" for="mpt1">EPFL Lausanne</label>
</div>
<div class="custom-control custom-radio">
<input type="radio" name="mpt" id="mpt2" class="custom-control-input" value="true" <?php echo ($_SESSION['postedForm']['mpt'] == "true") ? "checked=\"checked\"" : ''; ?>>
<label class="custom-control-label" for="mpt2">EPFL Valais Sion</label>
</div>
<button class="btn btn-primary" id="infoMpt">Infos sur la maturité professionnelle</button>
<!-- / Maturité -->
</div>
</div>
if ($_SESSION['postedForm']['job'] == $jobKey) {
echo "<option value='$jobKey' selected='selected'>$jobVal</option>";
} else {
echo "<option value='$jobKey'>$jobVal</option>";
}
}
?>
</select>
</form>
</main>
<select name="job" id="jbSion" class="jobSelectors" style="display: none;" data-required>
<option value="menu" selected disabled>Choisir une formation...</option>
<?php
foreach ($LISTJOB['Sion'] as $jobKey => $jobVal) {
if ($_SESSION['postedForm']['job'] == $jobKey) {
echo "<option value='$jobKey' selected='selected'>$jobVal</option>";
} else {
echo "<option value='$jobKey'>$jobVal</option>";
}
}
?>
</select>
</fieldset>
<div id="all" style="display: none;">
<fieldset>
<div id="infoOnly">
<?php include('templates/filieresinfos.php') ?>
</div>
<label for="mpt">Je désire m'inscire en maturité professionnelle intégrée*:</label><p>
<dl class="radio-list-left">
<dd>
......@@ -347,7 +364,6 @@
<input type="submit" value="Terminer"/>
</div>
</fieldset>
</div>
</form>
<script> lieu='<?php echo $_SESSION['postedForm']['lieu'] ;?>';</script>
<?php
......
......@@ -3,32 +3,10 @@
<img src="./style/epfl2018/svg/epfl-logo.svg" alt="Logo EPFL, École polytechnique fédérale de Lausanne" class="img-fluid">
</a>
<ul aria-hidden="true" class="nav-header d-none d-xl-flex">
<li id="menu-item-1">
<li>
<a class="nav-item">Candidature pour un apprentissage</a>
</li>
</ul>
<div class="dropdown dropright search d-none d-xl-block">
<a class="dropdown-toggle" href="#" data-toggle="dropdown">
<svg class="icon" aria-hidden="true"><use xlink:href="#icon-search"></use></svg>
</a>
<form action="#" class="dropdown-menu border-0 p-0">
<div class="search-form mt-1 input-group">
<label for="search" class="sr-only">Rechercher sur le site</label>
<input type="text" class="form-control" name="search" placeholder="Rechercher">
<button type="submit" class="d-none d-xl-block btn btn-primary input-group-append">Valider</button></div>
</form>
</div>
<form action="#" class="d-lg-none">
<div class="input-group search-mobile" role="search">
<div class="input-group-prepend">
<span class="input-group-text">
<svg class="icon" aria-hidden="true"><use xlink:href="#icon-search"></use></svg>
</span>
</div>
<label for="search" class="sr-only">Rechercher sur le site</label>
<input type="text" class="form-control" name="search" placeholder="Rechercher">
</div>
</form>
<nav class="nav-lang justify-self-end">
<a class="logo">
<img src="./style/img/FA.png" alt="Logo FA, Formation Apprentis EPFL" class="img-fluid">
......
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