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

remove animations

parent c4514f45
No related branches found
No related tags found
No related merge requests found
# Améliorations en cours
- [x] Utiliser la nouvelle charte 2018
- [x] Adapter pour ajouter les postulations dans une DB
- [x] Ajouter une page pour voir / supprimer sa / ses postulation(s)
- [x] Ajouter une page pour voir / supprimer ses postulations
- [x] Commentaires et section du code
- [ ] Editer ses postulation
- [ ] Editer ses postulations
# Améliorations possibles du formulaire canap.epfl.ch
......
......@@ -45,9 +45,13 @@
}
} else {
$_SESSION['formError'] = true;
$_SESSION['postedForm'] = $_POST;
$_SESSION['files'] = $_FILES;
include("templates/errorText.php");
if (isset($_GET['edit'])) {
include("templates/errorTextEdit.php");
} else {
$_SESSION['postedForm'] = $_POST;
$_SESSION['files'] = $_FILES;
include("templates/errorText.php");
}
}
?>
</body>
......
......@@ -58,7 +58,7 @@ function addChildren(parentId, maxItems, childTemplate, addButtonId) {
var fullTemplate = childTemplate.replace(/\{(.*?)\}/g, i);
$(parentId).append(fullTemplate);
if (i == maxItems - 1) {
$(addButtonId).hide(750);
$(addButtonId).hide();
}
}
}
......@@ -111,7 +111,7 @@ function initButtonsAction() {
}
});
$('#editPost').click(function () {
document.location.href = "form.php?edit";
document.location.href = "/form.php?edit";
});
$('#cancelEditBtn').click(function () {
document.location.href = "viewpostulation.php";
......@@ -128,6 +128,9 @@ function initButtonsAction() {
$('#retourFormulaire').click(function () {
history.go(-1);
});
$('#retourFormulaireEdit').click(function () {
document.location.href = "/form.php?edit";
});
$('#retourAccueil').click(function () {
document.location.href = "/index.php";
});
......@@ -157,23 +160,23 @@ function initAddChildButtons() {
+ '<label for="annexe' + nextIndex + '" class="btn btn-secondary btn-sm icon-right">Choisir...</label><br>'
+ '<small class="error" class="form-text text-muted"></small></td></tr>');
if (nextIndex == 9) {
$('#addInputFile').hide(750);
$('#addInputFile').hide();
}
}
});
}
function setMajState() {
$('#maj1')[0].checked ? $("#representants").show(1000) : $("#representants").hide(1000);
$('#maj1')[0].checked ? $("#representants").show() : $("#representants").hide();
}
function setDejaCandState() {
if ($('#dejaCand1')[0].checked) {
$("#dejaCandAnnee").hide(750);
$("#dejaCandAnnee").hide();
$("#dejaCandAnneeInput").val("");
$("#dejaCandError").html("");
} else {
$("#dejaCandAnnee").show(750);
$("#dejaCandAnnee").show();
}
}
......@@ -265,10 +268,10 @@ function showListJob(lieu) {
}
function showPolyAndInfoDivs(selectedFormation) {
if (selectedFormation != "menu") {
$("#all").show(1000);
selectedFormation == "informaticien" ? $("#infoOnly").show(1000) : $("#infoOnly").hide(500);
selectedFormation == "informaticien" ? $("#griTest").show(1000) : $("#griTest").hide(500);
selectedFormation == "polyMecanicien" ? $("#polyOnly").show(1000) : $("#polyOnly").hide(500);
$("#all").show();
selectedFormation == "informaticien" ? $("#infoOnly").show() : $("#infoOnly").hide();
selectedFormation == "informaticien" ? $("#griTest").show() : $("#griTest").hide();
selectedFormation == "polyMecanicien" ? $("#polyOnly").show() : $("#polyOnly").hide();
}
}
......
......@@ -5,12 +5,12 @@
if (!$_POST && !$_FILES) {
echo "<li>Fichiers fournis trop volumineux ! <small>(Taille recommandée env. 2Mo)</small></li>";
} else {
echo "<li>" . $_SESSION['edit_error'] . "</li>";
echo $_SESSION['edit_error'] != '' ? "<li>" . $_SESSION['edit_error'] . "</li>" : '';
foreach($validator->errors() as $error => $errorVal) {
echo "<li>$errorVal</li>";
}
}
?>
</div>
<button type="button" class="btn btn-primary btn-sm mt-3 mb-2" id="retourFormulaire">Retour au formulaire</button>
<button type="button" class="btn btn-primary btn-sm mt-3 mb-2" id="retourFormulaireEdit">Retour au formulaire</button>
</main>
\ 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