Fix crop for proposal image
This commit is contained in:
parent
576006ff6c
commit
5a17289e75
@ -1099,7 +1099,7 @@ class FormFile
|
|||||||
if ($disablecrop == -1)
|
if ($disablecrop == -1)
|
||||||
{
|
{
|
||||||
$disablecrop = 1;
|
$disablecrop = 1;
|
||||||
if (in_array($modulepart, array('bank', 'bom', 'expensereport', 'holiday', 'member', 'mrp', 'project', 'product', 'produit', 'service', 'societe', 'tax', 'ticket', 'user'))) $disablecrop = 0;
|
if (in_array($modulepart, array('bank', 'bom', 'expensereport', 'holiday', 'member', 'mrp', 'project', 'product', 'produit', 'propal', 'service', 'societe', 'tax', 'ticket', 'user'))) $disablecrop = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define relative path used to store the file
|
// Define relative path used to store the file
|
||||||
|
|||||||
@ -119,9 +119,20 @@ elseif ($modulepart == 'project')
|
|||||||
{
|
{
|
||||||
$result = $object->fetch($id);
|
$result = $object->fetch($id);
|
||||||
if ($result <= 0) dol_print_error($db, 'Failed to load object');
|
if ($result <= 0) dol_print_error($db, 'Failed to load object');
|
||||||
$dir = $conf->projet->dir_output; // By default
|
$dir = $conf->project->multidir_output[$object->entity]; // By default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
elseif ($modulepart == 'propal')
|
||||||
|
{
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||||
|
$object = new Propal($db);
|
||||||
|
if ($id > 0)
|
||||||
|
{
|
||||||
|
$result = $object->fetch($id);
|
||||||
|
if ($result <= 0) dol_print_error($db, 'Failed to load object');
|
||||||
|
$dir = $conf->propal->multidir_output[$object->entity]; // By default
|
||||||
|
}
|
||||||
|
}
|
||||||
elseif ($modulepart == 'holiday')
|
elseif ($modulepart == 'holiday')
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
|
||||||
@ -243,6 +254,7 @@ if (empty($backtourl))
|
|||||||
elseif (in_array($modulepart, array('holiday'))) $backtourl = DOL_URL_ROOT."/holiday/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
elseif (in_array($modulepart, array('holiday'))) $backtourl = DOL_URL_ROOT."/holiday/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
||||||
elseif (in_array($modulepart, array('member'))) $backtourl = DOL_URL_ROOT."/adherents/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
elseif (in_array($modulepart, array('member'))) $backtourl = DOL_URL_ROOT."/adherents/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
||||||
elseif (in_array($modulepart, array('project'))) $backtourl = DOL_URL_ROOT."/projet/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
elseif (in_array($modulepart, array('project'))) $backtourl = DOL_URL_ROOT."/projet/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
||||||
|
elseif (in_array($modulepart, array('propal'))) $backtourl = DOL_URL_ROOT."/comm/propal/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
||||||
elseif (in_array($modulepart, array('societe'))) $backtourl = DOL_URL_ROOT."/societe/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
elseif (in_array($modulepart, array('societe'))) $backtourl = DOL_URL_ROOT."/societe/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
||||||
elseif (in_array($modulepart, array('tax'))) $backtourl = DOL_URL_ROOT."/compta/sociales/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
elseif (in_array($modulepart, array('tax'))) $backtourl = DOL_URL_ROOT."/compta/sociales/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
||||||
elseif (in_array($modulepart, array('ticket'))) $backtourl = DOL_URL_ROOT."/ticket/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
elseif (in_array($modulepart, array('ticket'))) $backtourl = DOL_URL_ROOT."/ticket/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user