Skip to content
Snippets Groups Projects
Commit 6e8bad37 authored by Florian Azizian's avatar Florian Azizian
Browse files

FEAT #6157 translation + disable load template on server

parent 3d63d3cd
No related branches found
No related tags found
No related merge requests found
<?php
require 'modules/templates/class/templates_controler.php';
$templatesControler = new templates_controler();
if (!in_array($_REQUEST['fileMimeType'],array('application/msword','application/vnd.openxmlformats-officedocument.wordprocessing‌​ml.document','application/vnd.openxmlformats-officedocument.spreadsheetml.sheet','application/vnd.ms-excel','application/vnd.ms-powerpoint','application/vnd.openxmlformats-officedocument.presentationml‌​.slideshow','application/vnd.oasis.opendocument.text','application/vnd.oasis.opendocument.presentation','application/vnd.oasis.opendocument.spreadsheet'))) {
echo "{\"status\":1,\"error_txt\":\"EXTENSION_NOT_ALLOWED\"}";
if (!in_array($_REQUEST['fileMimeType'],array('application/msword','application/vnd.openxmlformats-officedocument.wordprocessingml.document','application/vnd.openxmlformats-officedocument.spreadsheetml.sheet','application/vnd.ms-excel','application/vnd.ms-powerpoint','application/vnd.openxmlformats-officedocument.presentationml‌​.slideshow','application/vnd.oasis.opendocument.text','application/vnd.oasis.opendocument.presentation','application/vnd.oasis.opendocument.spreadsheet'))) {
echo "{\"status\":1,\"error_txt\":\""._EXTENSION_NOT_ALLOWED."\"}";
exit();
}
if (isset($_REQUEST['fileContent'])) {
......
......@@ -103,11 +103,11 @@ function select_template(path_to_script, attachment_type)
function addTemplateBase(file)
{
if (confirm('En cliquant sur ok, le modèle sera ajouté dans la liste des natures de modèle.')) {
saveTemplateBase = "yes";
}else{
// if (confirm('En cliquant sur ok, le modèle sera ajouté dans la liste des natures de modèle.')) {
// saveTemplateBase = "yes";
// }else{
saveTemplateBase = "no";
}
// }
var reader = new FileReader();
reader.readAsDataURL(file.files[0]);
reader.onload = function () {
......
......@@ -144,3 +144,6 @@ if (!defined("_TEMPLATE_TARGET"))
if (!defined("_NO_TARGET"))
define("_NO_TARGET", "No target");
if (!defined("_EXTENSION_NOT_ALLOWED"))
define("_EXTENSION_NOT_ALLOWED", "Extension not allowed");
......@@ -143,3 +143,6 @@ if (!defined("_TEMPLATE_TARGET"))
if (!defined("_NO_TARGET"))
define("_NO_TARGET", "Pas de cible");
if (!defined("_EXTENSION_NOT_ALLOWED"))
define("_EXTENSION_NOT_ALLOWED", "Extension non autorisée");
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