New : Link to create new element on linked fields
This commit is contained in:
parent
08ca85e995
commit
7d25311ce5
@ -5799,6 +5799,10 @@ abstract class CommonObject
|
|||||||
$param_list=array_keys($param['options']); // $param_list='ObjectName:classPath'
|
$param_list=array_keys($param['options']); // $param_list='ObjectName:classPath'
|
||||||
$showempty=(($required && $default != '')?0:1);
|
$showempty=(($required && $default != '')?0:1);
|
||||||
$out=$form->selectForForms($param_list[0], $keyprefix.$key.$keysuffix, $value, $showempty);
|
$out=$form->selectForForms($param_list[0], $keyprefix.$key.$keysuffix, $value, $showempty);
|
||||||
|
list($class,$classfile)=explode(':',$param_list[0]);
|
||||||
|
if(file_exists(dol_buildpath(dirname(dirname($classfile)).'/card.php')))$url_path=dol_buildpath(dirname(dirname($classfile)).'/card.php',1);
|
||||||
|
else $url_path=dol_buildpath(dirname(dirname($classfile)).'/'.$class.'_card.php',1);
|
||||||
|
$out.='<a class="butActionNew" href="'.$url_path.'?action=create&backtopage='.$_SERVER['PHP_SELF'].'"><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||||
}
|
}
|
||||||
elseif ($type == 'password')
|
elseif ($type == 'password')
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user