diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index e4e767b3cee..5f0741b26d4 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -8277,7 +8277,7 @@ abstract class CommonObject if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER) && ($action == 'view' || $action == 'valid' || $action == 'editline' || $action == 'confirm_valid' || $action == 'confirm_cancel')) { $out .= ''; } - $out .= ''; $out .= '
'."\n"; // Other attributes - $tpl_context = 'public'; // define template context to public + $parameters['tpl_context']='public'; // define template context to public include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; // Comments diff --git a/htdocs/public/partnership/new.php b/htdocs/public/partnership/new.php index c84648400fd..2884c7099c3 100644 --- a/htdocs/public/partnership/new.php +++ b/htdocs/public/partnership/new.php @@ -579,28 +579,7 @@ jQuery(document).ready(function () { '; -print ''."\n"; - // Type -/* -if (empty($conf->global->PARTNERSHIP_NEWFORM_FORCETYPE)) { - $listoftype = $partnershipt->liste_array(); - $tmp = array_keys($listoftype); - $defaulttype = ''; - $isempty = 1; - if (count($listoftype) == 1) { - $defaulttype = $tmp[0]; - $isempty = 0; - } - print ''."\n"; -} else { - $partnershipt->fetch($conf->global->PARTNERSHIP_NEWFORM_FORCETYPE); - print ''; -} -*/ - $partnershiptype = new PartnershipType($db); $listofpartnershipobj = $partnershiptype->fetchAll('', '', 1000, 0, array('active'=>1)); $listofpartnership = array(); @@ -608,15 +587,17 @@ foreach ($listofpartnershipobj as $partnershipobj) { $listofpartnership[$partnershipobj->id] = $partnershipobj->label; } -if (empty($conf->global->PARTNERSHIP_NEWFORM_FORCETYPE)) { - print ''."\n"; -} else { +if (getDolGlobalString('PARTNERSHIP_NEWFORM_FORCETYPE')) { print $listofpartnership[$conf->global->PARTNERSHIP_NEWFORM_FORCETYPE]; print ''; } +print '
'.$langs->trans("Type").' *'; - print $form->selectarray("typeid", $partnershipt->liste_array(1), GETPOST('typeid') ? GETPOST('typeid') : $defaulttype, $isempty); - print '
'.$langs->trans('PartnershipType').' *'."\n"; - print $form->selectarray("partnershiptype", $listofpartnership, GETPOSTISSET('partnershiptype') ? GETPOST('partnershiptype', 'int') : 'ifone', 1); - print '
'."\n"; +if (!getDolGlobalString('PARTNERSHIP_NEWFORM_FORCETYPE')) { + print ''."\n"; +} // Company print ''."\n"; // Other attributes -$tpl_context = 'public'; // define template context to public +$parameters['tdclass']='titlefield'; +$parameters['tpl_context']='public'; // define template context to public include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; // Comments print ''; diff --git a/htdocs/public/project/new.php b/htdocs/public/project/new.php index d4d6b4b68b5..50759aeede9 100644 --- a/htdocs/public/project/new.php +++ b/htdocs/public/project/new.php @@ -537,7 +537,7 @@ if (empty($conf->global->SOCIETE_DISABLE_STATE)) { } // Other attributes -$tpl_context = 'public'; // define template context to public +$parameters['tpl_context']='public'; // define template context to public include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; // Comments print '';
'.$langs->trans('PartnershipType').' *'."\n"; + print $form->selectarray("partnershiptype", $listofpartnership, GETPOSTISSET('partnershiptype') ? GETPOST('partnershiptype', 'int') : 'ifone', 1); + print '
'.$langs->trans("Company").' *'; print img_picto('', 'company', 'class="pictofixedwidth"'); @@ -670,7 +651,8 @@ if (empty($conf->global->SOCIETE_DISABLE_STATE)) { // Logo //print '
'.$langs->trans("URLPhoto").'