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
0bdcde36bf
commit
d9e239fd85
@ -277,7 +277,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists())
|
||||
// -----------------------------------------
|
||||
// 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->display_canvas(); // Show template
|
||||
}
|
||||
@ -324,6 +328,8 @@ else
|
||||
/*
|
||||
* Fiche en mode creation
|
||||
*/
|
||||
$object->canvas=$canvas;
|
||||
|
||||
$object->fk_departement = $_POST["departement_id"];
|
||||
|
||||
// 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");
|
||||
|
||||
if ($action == 'update') $object->fetch($socid);
|
||||
else $object->canvas=$canvas;
|
||||
|
||||
if (GETPOST("private") == 1)
|
||||
{
|
||||
@ -474,9 +475,13 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists())
|
||||
// -----------------------------------------
|
||||
// When used with CANVAS
|
||||
// -----------------------------------------
|
||||
|
||||
$objcanvas->assign_values($action, $socid); // Set value for templates
|
||||
$objcanvas->display_canvas(); // Show template
|
||||
if (! $objcanvas->hasActions() && $socid)
|
||||
{
|
||||
$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
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user