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

update script

parent 5d7b1432
No related merge requests found
......@@ -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();
......
......@@ -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(); }
......
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