Debug v17

This commit is contained in:
Laurent Destailleur 2023-02-21 10:34:21 +01:00
parent ee9d65732c
commit d050471eb0
6 changed files with 26 additions and 35 deletions

View File

@ -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 .= '<td></td>';
}
$out .= '<td class="titlefieldcreate wordbreak';
$out .= '<td class="'.(empty($params['tdclass']) ? 'titlefieldcreate' : $params['tdclass']).' wordbreak';
} elseif ($display_type == 'line') {
$out .= '<div '.($html_id ? 'id="'.$html_id.'" ' : '').$csstyle.' class="fieldline_options_'.$key.' '.$class.$this->element.'_extras_'.$key.' trextrafields_collapse'.$extrafields_collapse_num.(!empty($this->id)?'_'.$this->id:'').'" '.$domData.' >';
$out .= '<div style="display: inline-block; padding-right:4px" class="wordbreak';

View File

@ -45,10 +45,13 @@ $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object,
print $hookmanager->resPrint;
if (empty($reshook)) {
$params = array();
if (isset($tpl_context)) {
$params['tpl_context'] = $tpl_context;
}
$params['cols'] = key_exists('colspanvalue', $parameters) ? $parameters['colspanvalue'] : '';
if (!empty($parameters['tdclass'])) {
$params['tdclass'] = $parameters['tdclass'];
}
if (!empty($parameters['tpl_context'])) {
$params['tpl_context'] = $parameters['tpl_context'];
}
print $object->showOptionals($extrafields, 'create', $params);
}

View File

@ -42,8 +42,14 @@ $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object,
print $hookmanager->resPrint;
if (empty($reshook)) {
$params = array();
if (isset($tpl_context)) $params['tpl_context'] = $tpl_context;
$params['cols'] = $parameters['colspanvalue'];
$params['cols'] = key_exists('colspanvalue', $parameters) ? $parameters['colspanvalue'] : '';
if (!empty($parameters['tdclass'])) {
$params['tdclass'] = $parameters['tdclass'];
}
if (!empty($parameters['tpl_context'])) {
$params['tpl_context'] = $parameters['tpl_context'];
}
print $object->showOptionals($extrafields, 'create', $params);
}

View File

@ -677,7 +677,7 @@ if (!empty($conf->global->MEMBER_SKIP_TABLE) || !empty($conf->global->MEMBER_NEW
print '<tr><td>'.$langs->trans("Public").'</td><td><input type="checkbox" name="public"></td></tr>'."\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

View File

@ -579,28 +579,7 @@ jQuery(document).ready(function () {
</script>';
print '<table class="border" summary="form to subscribe" id="tablesubscribe">'."\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 '<tr><td class="titlefield">'.$langs->trans("Type").' <span style="color: red">*</span></td><td>';
print $form->selectarray("typeid", $partnershipt->liste_array(1), GETPOST('typeid') ? GETPOST('typeid') : $defaulttype, $isempty);
print '</td></tr>'."\n";
} else {
$partnershipt->fetch($conf->global->PARTNERSHIP_NEWFORM_FORCETYPE);
print '<input type="hidden" id="typeid" name="typeid" value="'.$conf->global->PARTNERSHIP_NEWFORM_FORCETYPE.'">';
}
*/
$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 '<tr class="morphy"><td class="titlefield">'.$langs->trans('PartnershipType').' <span style="color: red">*</span></td><td>'."\n";
print $form->selectarray("partnershiptype", $listofpartnership, GETPOSTISSET('partnershiptype') ? GETPOST('partnershiptype', 'int') : 'ifone', 1);
print '</td></tr>'."\n";
} else {
if (getDolGlobalString('PARTNERSHIP_NEWFORM_FORCETYPE')) {
print $listofpartnership[$conf->global->PARTNERSHIP_NEWFORM_FORCETYPE];
print '<input type="hidden" id="partnershiptype" name="partnershiptype" value="'.$conf->global->PARTNERSHIP_NEWFORM_FORCETYPE.'">';
}
print '<table class="border" summary="form to subscribe" id="tablesubscribe">'."\n";
if (!getDolGlobalString('PARTNERSHIP_NEWFORM_FORCETYPE')) {
print '<tr class="morphy"><td>'.$langs->trans('PartnershipType').' <span style="color: red">*</span></td><td>'."\n";
print $form->selectarray("partnershiptype", $listofpartnership, GETPOSTISSET('partnershiptype') ? GETPOST('partnershiptype', 'int') : 'ifone', 1);
print '</td></tr>'."\n";
}
// Company
print '<tr id="trcompany" class="trcompany"><td>'.$langs->trans("Company").' <span style="color:red;">*</span></td><td>';
print img_picto('', 'company', 'class="pictofixedwidth"');
@ -670,7 +651,8 @@ if (empty($conf->global->SOCIETE_DISABLE_STATE)) {
// Logo
//print '<tr><td>'.$langs->trans("URLPhoto").'</td><td><input type="text" name="photo" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('photo')).'"></td></tr>'."\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 '<tr>';

View File

@ -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 '<tr>';