diff --git a/canapEPFL/script.js b/canapEPFL/script.js
index 2e70c445d58563ff5e20e1e3ea9fd48247443ca3..d73ef81aa294d9b93886b84bc31911ddb37f5b19 100644
--- a/canapEPFL/script.js
+++ b/canapEPFL/script.js
@@ -66,15 +66,15 @@ function addChildren(parentId, maxItems, childTemplate, addButtonId) {
 function changeTitleFile(objFile) {
     var filename = $(objFile)[0].value.replace(/^.*[\\/]/, '');
     if (filename) {
-        $(objFile.parentElement)[0].children[3].innerHTML = filename;
+        location.search == "?edit" ? $(objFile.parentElement)[0].children[4].innerHTML = filename : $(objFile.parentElement)[0].children[3].innerHTML = filename;
     } else {
-        $(objFile.parentElement)[0].children[3].innerHTML = 'Choisir...';
+        location.search == "?edit" ? $(objFile.parentElement)[0].children[4].innerHTML = 'Remplacer...' : $(objFile.parentElement)[0].children[3].innerHTML = 'Choisir...';
     }
     checkFileFormat($(objFile)[0]);
 }
 
 function checkFileFormat(obj) {
-    var errorZone = $(obj.parentElement)[0].children[5];
+    var errorZone = location.search == "?edit" ? $(obj.parentElement)[0].children[6] : $(obj.parentElement)[0].children[5];
     var allowedExtensions = ['pdf', 'jpeg', 'png', 'jpg'];
     var fileExtension = obj.value.split('.').pop().toLowerCase();
 
diff --git a/canapEPFL/templates/head.php b/canapEPFL/templates/head.php
index 1169763e9f74a6e079bc1f4715b99e895e93022a..1639fee1e890710af5bd45e719291deb740c5fa5 100644
--- a/canapEPFL/templates/head.php
+++ b/canapEPFL/templates/head.php
@@ -23,8 +23,8 @@
 <?php
   ini_set("display_errors", 0);
   error_reporting(0);
-  ini_set("display_errors", 1);
-  error_reporting(E_ALL);
+  // ini_set("display_errors", 1);
+  // error_reporting(E_ALL);
   require_once('configs/config.php');
   require('configs/db.php');
   if (!isset($_SESSION)) { session_start(); }