Fix: Little fix after canvas changes to be able to have "pure canvas" (canvas with no controller, only templates).
This commit is contained in:
parent
bebf134caa
commit
ed81eedb7c
@ -277,7 +277,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists())
|
|||||||
// -----------------------------------------
|
// -----------------------------------------
|
||||||
// When used with CANVAS
|
// When used with CANVAS
|
||||||
// -----------------------------------------
|
// -----------------------------------------
|
||||||
|
if (! $objcanvas->hasActions() && $id)
|
||||||
|
{
|
||||||
|
$object = new Societe($db);
|
||||||
|
$object->fetch($id); // For use with "pure canvas" (canvas that contains templates only)
|
||||||
|
}
|
||||||
$objcanvas->assign_values($action, $id); // Set value for templates
|
$objcanvas->assign_values($action, $id); // Set value for templates
|
||||||
$objcanvas->display_canvas(); // Show template
|
$objcanvas->display_canvas(); // Show template
|
||||||
}
|
}
|
||||||
@ -324,6 +328,8 @@ else
|
|||||||
/*
|
/*
|
||||||
* Fiche en mode creation
|
* Fiche en mode creation
|
||||||
*/
|
*/
|
||||||
|
$object->canvas=$canvas;
|
||||||
|
|
||||||
$object->fk_departement = $_POST["departement_id"];
|
$object->fk_departement = $_POST["departement_id"];
|
||||||
|
|
||||||
// We set pays_id, pays_code and label for the selected country
|
// We set pays_id, pays_code and label for the selected country
|
||||||
|
|||||||
@ -104,6 +104,7 @@ if (empty($reshook))
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
|
||||||
|
|
||||||
if ($action == 'update') $object->fetch($socid);
|
if ($action == 'update') $object->fetch($socid);
|
||||||
|
else $object->canvas=$canvas;
|
||||||
|
|
||||||
if (GETPOST("private") == 1)
|
if (GETPOST("private") == 1)
|
||||||
{
|
{
|
||||||
@ -474,9 +475,13 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists())
|
|||||||
// -----------------------------------------
|
// -----------------------------------------
|
||||||
// When used with CANVAS
|
// When used with CANVAS
|
||||||
// -----------------------------------------
|
// -----------------------------------------
|
||||||
|
if (! $objcanvas->hasActions() && $socid)
|
||||||
$objcanvas->assign_values($action, $socid); // Set value for templates
|
{
|
||||||
$objcanvas->display_canvas(); // Show template
|
$object = new Societe($db);
|
||||||
|
$object->fetch($socid); // For use with "pure canvas" (canvas that contains templates only)
|
||||||
|
}
|
||||||
|
$objcanvas->assign_values($action, $socid); // Set value for templates
|
||||||
|
$objcanvas->display_canvas(); // Show template
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user