diff --git a/canapEPFL/cible.php b/canapEPFL/cible.php
index ea370a4fa4e29778fcf04e39b8696ca55e706ad6..693fb8dfb7b49191188a743a65b0b3253390945a 100644
--- a/canapEPFL/cible.php
+++ b/canapEPFL/cible.php
@@ -28,8 +28,11 @@
 
           // create dir + move files in it
           $filesPath = createFilesFolder($candidateData->rootpath, $candidateId);
+          // TODO: check if i can pass only candidateData
           $candidateData = uploadAllFiles($filesPath, $candidateData->fichiers, $candidateData);
 
+          // print_r($candidateData->fichiers);
+
           // insert files in DB
           insertFiles($pdo, $candidateData->fichiers, $candidateId, $candidateData->rootpath);
 
diff --git a/canapEPFL/form.php b/canapEPFL/form.php
index 71facd4c016662f44ed2495e15692f27e8eff10a..5b8faf823a31ee9767187dd9bd3964c3260f2a4e 100644
--- a/canapEPFL/form.php
+++ b/canapEPFL/form.php
@@ -108,7 +108,9 @@
           </div>
           <!-- / Conditions -->
           <button class="btn btn-primary btn-block" type="submit">Terminer</button>
-          <button class="btn btn-secondary btn-block" id="cancelEditBtn" type="button">Annuler</button>
+          <?php if (isset($_GET['edit'])) { ?>
+            <button class="btn btn-secondary btn-block" id="cancelEditBtn" type="button">Annuler</button>
+          <?php } ?>
         </div>
         <!-- / div all -->
       </form>
diff --git a/canapEPFL/helpers.php b/canapEPFL/helpers.php
index 57e6caabdb99ee04267cb77bf40bf28c98a448c2..65e884e270840d822563132b92c48689323a87d2 100644
--- a/canapEPFL/helpers.php
+++ b/canapEPFL/helpers.php
@@ -25,20 +25,20 @@ function uploadFile(&$candidateData, $pathAnnexes, $file, $key, $name){
   $extension = strtolower(strrchr($file['name'], '.'));
   $file['name'] = $name . $extension;
   move_uploaded_file($file['tmp_name'], $pathAnnexes . $file['name']);
-  $candidateData->fichiers[$name] = $file['name'];
-  unset($candidateData->fichiers[$key]);
+  $candidateData->fichiers[$name]['name'] = $file['name'];
+  // unset($candidateData->fichiers[$key]);
 }
 
-function uploadAllFiles($pathAnnexes, $postedFiles, $candidateData){
-  uploadFile($candidateData, $pathAnnexes, $postedFiles['photo'], 'photo', "photo-passeport");
-  uploadFile($candidateData, $pathAnnexes, $postedFiles['idCard'], 'idCard', "carte-identite");
-  uploadFile($candidateData, $pathAnnexes, $postedFiles['cv'], 'cv', "curriculum-vitae");
-  uploadFile($candidateData, $pathAnnexes, $postedFiles['lettre'], 'lettre', "lettre-motivation");
+function uploadAllFiles($pathAnnexes, $postedFiles, $candidateData) {
+  uploadFile($candidateData, $pathAnnexes, $postedFiles['photo-passeport'], 'photo-passeport', "photo-passeport");
+  uploadFile($candidateData, $pathAnnexes, $postedFiles['carte-identite'], 'carte-identite', "carte-identite");
+  uploadFile($candidateData, $pathAnnexes, $postedFiles['curriculum-vitae'], 'curriculum-vitae', "curriculum-vitae");
+  uploadFile($candidateData, $pathAnnexes, $postedFiles['lettre-motivation'], 'lettre-motivation', "lettre-motivation");
 
   for ($i = 1; $i <= 9; $i++){
-    if (array_key_exists('certifs'.$i, $postedFiles)){
-      if (!($postedFiles['certifs'.$i]['name'] == "")) {
-        uploadFile($candidateData, $pathAnnexes, $postedFiles['certifs'.$i], 'certifs'.$i, "annexe".$i);
+    if (array_key_exists('annexe'.$i, $postedFiles)){
+      if (!($postedFiles['annexe'.$i]['name'] == "")) {
+        uploadFile($candidateData, $pathAnnexes, $postedFiles['annexe'.$i], 'annexe'.$i, "annexe".$i);
       }
     }
   }
@@ -194,9 +194,9 @@ function insertFiles ($pdo, $files, $applicantId, $filesPath) {
   $sqlreq = "INSERT INTO file (file_name, file_path, fk_applicant_id)
     VALUES (:file_name, :file_path, :fk_applicant_id)";
   foreach ($files as $file) {
-    $filePath = $userPath . $file;
+    $filePath = $userPath . $file['name'];
     $query = $pdo->prepare($sqlreq);
-    $query->bindParam(':file_name', $file, PDO::PARAM_STR);
+    $query->bindParam(':file_name', $file['name'], PDO::PARAM_STR);
     $query->bindParam(':file_path', $filePath, PDO::PARAM_STR);
     $query->bindParam(':fk_applicant_id', $applicantId, PDO::PARAM_INT);
     $query->execute();
@@ -353,7 +353,7 @@ function updatePostulation ($pdo, $posted_data) {
   $query = $pdo->prepare($sqlreq);
   $query->bindParam(':id', $posted_data->id, PDO::PARAM_STR);
   $query->bindParam(':applicant_maturity', $posted_data->maturite, PDO::PARAM_BOOL);
-  $query->bindParam(':applicant_it_section', $posted_data->filiere, PDO::PARAM_BOOL);
+  $query->bindParam(':applicant_it_section', $posted_data->filiere, PDO::PARAM_STR);
   $query->bindParam(':applicant_gender', $posted_data->genreApprenti, PDO::PARAM_STR);
   $query->bindParam(':applicant_address_street', $posted_data->addresseApprentiComplete['rue'], PDO::PARAM_STR);
   $query->bindParam(':applicant_address_npa', $posted_data->addresseApprentiComplete['NPA'], PDO::PARAM_STR);
@@ -412,6 +412,7 @@ function updatePostulation ($pdo, $posted_data) {
     $query->bindParam(':responsible_phone', $sec_rep['telephone'], PDO::PARAM_STR);
     $query->execute();
   }
+  // TODO: si nouveau, insert
 
   // update scolarities
   $to_add = [];
@@ -460,19 +461,19 @@ function updatePostulation ($pdo, $posted_data) {
   $sqlreq = "UPDATE training SET training_job=:training_job, training_company=:training_company
   WHERE fk_applicant_id=:applicant_id AND training_id=:training_id";
 
-foreach ($posted_data->stages as $training) {
-  if (isset($training['id'])) {
-    $query = $pdo->prepare($sqlreq);
-    $query->bindParam(':applicant_id', $posted_data->id, PDO::PARAM_INT);
-    $query->bindParam(':training_id', $training['id'], PDO::PARAM_INT);
-    $query->bindParam(':training_company', $training['metier'], PDO::PARAM_STR);
-    $query->bindParam(':training_job', $training['employeur'], PDO::PARAM_STR);
-    $query->execute();
-  } else {
-    array_push($to_add, $training);
+  foreach ($posted_data->stages as $training) {
+    if (isset($training['id'])) {
+      $query = $pdo->prepare($sqlreq);
+      $query->bindParam(':applicant_id', $posted_data->id, PDO::PARAM_INT);
+      $query->bindParam(':training_id', $training['id'], PDO::PARAM_INT);
+      $query->bindParam(':training_company', $training['metier'], PDO::PARAM_STR);
+      $query->bindParam(':training_job', $training['employeur'], PDO::PARAM_STR);
+      $query->execute();
+    } else {
+      array_push($to_add, $training);
+    }
   }
-}
-insertTrainings($pdo, $to_add, $posted_data->id);
+  insertTrainings($pdo, $to_add, $posted_data->id);
 
 // Update files
 foreach ($posted_files as $key => $file) {
diff --git a/canapEPFL/models/PersonnalData.php b/canapEPFL/models/PersonnalData.php
index 08e2faa3ce5c42c9aaedaa8141f050118389bf67..53e95a733d5b1a039b5ccda389b0f8d72b4e1cf6 100644
--- a/canapEPFL/models/PersonnalData.php
+++ b/canapEPFL/models/PersonnalData.php
@@ -135,7 +135,6 @@ class PersonnalData {
         }
     }
     private function setFiles ($postedFiles, $ids) {
-        // Clear empty files
         foreach ($postedFiles as $key => $file) {
             if ($file['error'] != 0) {
                 unset($postedFiles[$key]);
diff --git a/canapEPFL/models/PersonnalDataValidator.php b/canapEPFL/models/PersonnalDataValidator.php
index 7399717211bedec4433bde68c8aefd5191e86367..c1b3533058a9d5d65b5161f5265c835e36c005ca 100644
--- a/canapEPFL/models/PersonnalDataValidator.php
+++ b/canapEPFL/models/PersonnalDataValidator.php
@@ -126,7 +126,7 @@ class PersonnalDataValidator {
     private function filesValid () {
         $filesToCheck = $this->personnalData->fichiers;
         $validExt = ['.pdf', '.jpeg', '.png', '.jpg'];
-        $requiredKeys = ['photo', 'idCard', 'cv', 'lettre', 'certifs1'];
+        $requiredKeys = ['photo-passeport', 'carte-identite', 'curriculum-vitae', 'lettre-motivation'];
 
         foreach($filesToCheck as $key => $file) {
             // Pour les fichiers obligatoire
diff --git a/canapEPFL/script.js b/canapEPFL/script.js
index dca62d0f151ddd78bb9e270dea6713e6771721ba..2e70c445d58563ff5e20e1e3ea9fd48247443ca3 100644
--- a/canapEPFL/script.js
+++ b/canapEPFL/script.js
@@ -152,9 +152,9 @@ function initAddChildButtons() {
     $('#addInputFile').click(function () {
         var nextIndex = $('#newCertifZone > tbody').children().length + 1;
         if (nextIndex < 10) {
-            $('#newCertifZone').append('<tr><td><label for="certifs' + nextIndex + '">Annexe supplémentaire</label><br>'
-                + '<input type="file" name="certifs' + nextIndex + '" class="upload-input" id="certifs' + nextIndex + '" onchange="changeTitleFile(this)"/>'
-                + '<label for="certifs' + nextIndex + '" class="btn btn-secondary btn-sm icon-right">Choisir...</label><br>'
+            $('#newCertifZone').append('<tr><td><label for="annexe' + nextIndex + '">Annexe supplémentaire</label><br>'
+                + '<input type="file" name="annexe' + nextIndex + '" class="upload-input" id="annexe' + nextIndex + '" onchange="changeTitleFile(this)"/>'
+                + '<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);
diff --git a/canapEPFL/templates/formParts/edit/annexes.php b/canapEPFL/templates/formParts/edit/annexes.php
index 1b1f92c0b62ca8abd449c1c8987c6959da265c81..135f01de178e51b6d6b1ee8e5924bf9bc7598f36 100644
--- a/canapEPFL/templates/formParts/edit/annexes.php
+++ b/canapEPFL/templates/formParts/edit/annexes.php
@@ -62,7 +62,7 @@
         </td>
       </tr>
     </table>
-  </div>
-  <button type="button" class="btn btn-primary btn-sm mt-3 mb-2" id="addInputFile">Ajouter une annexe</button> -->
+  </div> -->
+  <button type="button" class="btn btn-primary btn-sm mt-3 mb-2" id="addInputFile">Ajouter une annexe</button>
   <!-- region/ Annexes supplémentaires -->
 </div>
\ No newline at end of file
diff --git a/canapEPFL/templates/formParts/edit/filieresinfos.php b/canapEPFL/templates/formParts/edit/filieresinfos.php
index 4d3781aa90acddc9a75499c4c8e9cd964b6e1e6f..a788c4a32b80193fd07f895baeb5063bb56d1eb9 100644
--- a/canapEPFL/templates/formParts/edit/filieresinfos.php
+++ b/canapEPFL/templates/formParts/edit/filieresinfos.php
@@ -1,4 +1,5 @@
 <div class="form-group">
+<?= $current_post['applicant_it_section'] ?>
   <label>Filières informatiques:*</label>
   <div class="custom-control custom-radio">
     <input type="radio" name="filInfo" id="fill1" class="custom-control-input" value="developpementApplications" <?php echo ($current_post['applicant_it_section'] == "developpementApplications") ? "checked=\"checked\"" : ''; ?>>
diff --git a/canapEPFL/templates/formParts/new/annexes.php b/canapEPFL/templates/formParts/new/annexes.php
index f6ad19c2cd475a792d0848d4596eec31d0f6f59a..9ec82bd990e65548870b3f87ba299667930f5337 100644
--- a/canapEPFL/templates/formParts/new/annexes.php
+++ b/canapEPFL/templates/formParts/new/annexes.php
@@ -4,10 +4,10 @@
 <!-- Annexes obligatoires -->
 <div class="form-group mt-3" id="files">
   <div class="form-group">
-    <label for="photo">Photo passeport <strong>couleur: *</strong></label>
-    <input type="file" name="photo" class="upload-input" id="photo" onchange="changeTitleFile(this)" data-required/>
+    <label for="photo-passeport">Photo passeport <strong>couleur: *</strong></label>
+    <input type="file" name="photo-passeport" class="upload-input" id="photo-passeport" onchange="changeTitleFile(this)" data-required/>
     <br>
-    <label for="photo" class="btn btn-secondary btn-sm icon-right">
+    <label for="photo-passeport" class="btn btn-secondary btn-sm icon-right">
       Choisir...
     </label>
     <br>
@@ -15,10 +15,10 @@
   </div>
 
   <div class="form-group">
-    <label for="idCard">Copie carte d'indentité / passeport: *</label>
-    <input type="file" name="idCard" class="upload-input" id="idCard" onchange="changeTitleFile(this)" data-required/>
+    <label for="carte-identite">Copie carte d'indentité / passeport: *</label>
+    <input type="file" name="carte-identite" class="upload-input" id="carte-identite" onchange="changeTitleFile(this)" data-required/>
     <br>
-    <label for="idCard" class="btn btn-secondary btn-sm icon-right">
+    <label for="carte-identite" class="btn btn-secondary btn-sm icon-right">
       Choisir...
     </label>
     <br>
@@ -26,10 +26,10 @@
   </div>
 
   <div class="form-group">
-    <label for="cv">Curriculum Vitae: *</label>
-    <input type="file" name="cv" class="upload-input" id="cv" onchange="changeTitleFile(this)" data-required/>
+    <label for="curriculum-vitae">Curriculum Vitae: *</label>
+    <input type="file" name="curriculum-vitae" class="upload-input" id="curriculum-vitae" onchange="changeTitleFile(this)" data-required/>
     <br>
-    <label for="cv" class="btn btn-secondary btn-sm icon-right">
+    <label for="curriculum-vitae" class="btn btn-secondary btn-sm icon-right">
       Choisir...
     </label>
     <br>
@@ -37,10 +37,10 @@
   </div>
 
   <div class="form-group">
-    <label for="lettre">Lettre de motivation: *</label>
-    <input type="file" name="lettre" class="upload-input" id="lettre" onchange="changeTitleFile(this)" data-required/>
+    <label for="lettre-motivation">Lettre de motivation: *</label>
+    <input type="file" name="lettre-motivation" class="upload-input" id="lettre-motivation" onchange="changeTitleFile(this)" data-required/>
     <br>
-    <label for="lettre" class="btn btn-secondary btn-sm icon-right">
+    <label for="lettre-motivation" class="btn btn-secondary btn-sm icon-right">
       Choisir...
     </label>
     <br>
@@ -75,10 +75,10 @@
     <table id="newCertifZone">
       <tr>
         <td>
-          <label for="certifs1">Certificats, diplômes et bulletins de notes des derniers 3-4 semestres:</label>
-          <input type="file" name="certifs1" class="upload-input" id="certifs1" onchange="changeTitleFile(this)"/>
+          <label for="annexe1">Certificats, diplômes et bulletins de notes des derniers 3-4 semestres:</label>
+          <input type="file" name="annexe1" class="upload-input" id="annexe1" onchange="changeTitleFile(this)"/>
           <br>
-          <label for="certifs1" class="btn btn-secondary btn-sm icon-right">
+          <label for="annexe1" class="btn btn-secondary btn-sm icon-right">
             Choisir...
           </label>
           <br>