forked from Wavyzz/dolibarr
Debug v20
This commit is contained in:
@@ -8892,13 +8892,15 @@ abstract class CommonObject
|
|||||||
|
|
||||||
$labeltoshow = $langs->trans($label);
|
$labeltoshow = $langs->trans($label);
|
||||||
$helptoshow = $langs->trans($extrafields->attributes[$this->table_element]['help'][$key]);
|
$helptoshow = $langs->trans($extrafields->attributes[$this->table_element]['help'][$key]);
|
||||||
|
|
||||||
if ($display_type == 'card') {
|
if ($display_type == 'card') {
|
||||||
$out .= '<tr '.($html_id ? 'id="'.$html_id.'" ' : '').$csstyle.' class="field_options_'.$key.' '.$class.$this->element.'_extras_'.$key.' trextrafields_collapse'.$collapse_group.'" '.$domData.' >';
|
$out .= '<tr '.($html_id ? 'id="'.$html_id.'" ' : '').$csstyle.' class="field_options_'.$key.' '.$class.$this->element.'_extras_'.$key.' trextrafields_collapse'.$collapse_group.'" '.$domData.' >';
|
||||||
if (getDolGlobalString('MAIN_VIEW_LINE_NUMBER') && ($action == 'view' || $action == 'valid' || $action == 'editline' || $action == 'confirm_valid' || $action == 'confirm_cancel')) {
|
if (getDolGlobalString('MAIN_VIEW_LINE_NUMBER') && ($action == 'view' || $action == 'valid' || $action == 'editline' || $action == 'confirm_valid' || $action == 'confirm_cancel')) {
|
||||||
$out .= '<td></td>';
|
$out .= '<td></td>';
|
||||||
}
|
}
|
||||||
$out .= '<td class="'.(empty($params['tdclass']) ? 'titlefieldcreate' : $params['tdclass']).' wordbreak';
|
$out .= '<td class="'.(empty($params['tdclass']) ? 'titlefieldcreate' : $params['tdclass']).' wordbreak';
|
||||||
|
if ($extrafields->attributes[$this->table_element]['type'][$key] == 'text') {
|
||||||
|
$out .= ' tdtop';
|
||||||
|
}
|
||||||
} elseif ($display_type == 'line') {
|
} elseif ($display_type == 'line') {
|
||||||
$out .= '<div '.($html_id ? 'id="'.$html_id.'" ' : '').$csstyle.' class="fieldline_options_'.$key.' '.$class.$this->element.'_extras_'.$key.' trextrafields_collapse'.$collapse_group.'" '.$domData.' >';
|
$out .= '<div '.($html_id ? 'id="'.$html_id.'" ' : '').$csstyle.' class="fieldline_options_'.$key.' '.$class.$this->element.'_extras_'.$key.' trextrafields_collapse'.$collapse_group.'" '.$domData.' >';
|
||||||
$out .= '<div style="display: inline-block; padding-right:4px" class="wordbreak';
|
$out .= '<div style="display: inline-block; padding-right:4px" class="wordbreak';
|
||||||
@@ -8932,10 +8934,13 @@ abstract class CommonObject
|
|||||||
|
|
||||||
$out .= ($display_type == 'card' ? '</td>' : '</div>');
|
$out .= ($display_type == 'card' ? '</td>' : '</div>');
|
||||||
|
|
||||||
|
// Second column
|
||||||
$html_id = !empty($this->id) ? $this->element.'_extras_'.$key.'_'.$this->id : '';
|
$html_id = !empty($this->id) ? $this->element.'_extras_'.$key.'_'.$this->id : '';
|
||||||
if ($display_type == 'card') {
|
if ($display_type == 'card') {
|
||||||
// a first td column was already output (and may be another on before if MAIN_VIEW_LINE_NUMBER set), so this td is the next one
|
// a first td column was already output (and may be another on before if MAIN_VIEW_LINE_NUMBER set), so this td is the next one
|
||||||
$out .= '<td '.($html_id ? 'id="'.$html_id.'" ' : '').' class="valuefieldcreate '.$this->element.'_extras_'.$key.'" '.($colspan ? ' colspan="'.$colspan.'"' : '').'>';
|
$out .= '<td '.($html_id ? 'id="'.$html_id.'" ' : '').' class="valuefieldcreate '.$this->element.'_extras_'.$key;
|
||||||
|
$out .= '" '.($colspan ? ' colspan="'.$colspan.'"' : '');
|
||||||
|
$out .= '>';
|
||||||
} elseif ($display_type == 'line') {
|
} elseif ($display_type == 'line') {
|
||||||
$out .= '<div '.($html_id ? 'id="'.$html_id.'" ' : '').' style="display: inline-block" class="valuefieldcreate '.$this->element.'_extras_'.$key.' extra_inline_'.$extrafields->attributes[$this->table_element]['type'][$key].'">';
|
$out .= '<div '.($html_id ? 'id="'.$html_id.'" ' : '').' style="display: inline-block" class="valuefieldcreate '.$this->element.'_extras_'.$key.' extra_inline_'.$extrafields->attributes[$this->table_element]['type'][$key].'">';
|
||||||
}
|
}
|
||||||
@@ -8945,7 +8950,8 @@ abstract class CommonObject
|
|||||||
$out .= $extrafields->showOutputField($key, $value, '', $this->table_element);
|
$out .= $extrafields->showOutputField($key, $value, '', $this->table_element);
|
||||||
break;
|
break;
|
||||||
case "create":
|
case "create":
|
||||||
$out .= getPictoForType($extrafields->attributes[$this->table_element]['type'][$key]) . $extrafields->showInputField($key, $value, '', $keysuffix, '', 0, $this->id, $this->table_element);
|
$out .= getPictoForType($extrafields->attributes[$this->table_element]['type'][$key], ($extrafields->attributes[$this->table_element]['type'][$key] == 'text' ? 'tdtop' : ''));
|
||||||
|
$out .= $extrafields->showInputField($key, $value, '', $keysuffix, '', 0, $this->id, $this->table_element);
|
||||||
break;
|
break;
|
||||||
case "edit":
|
case "edit":
|
||||||
$out .= $extrafields->showInputField($key, $value, '', $keysuffix, '', 0, $this->id, $this->table_element);
|
$out .= $extrafields->showInputField($key, $value, '', $keysuffix, '', 0, $this->id, $this->table_element);
|
||||||
|
|||||||
@@ -4704,9 +4704,10 @@ function dol_trunc($string, $size = 40, $trunc = 'right', $stringencoding = 'UTF
|
|||||||
* Return the picto for a data type
|
* Return the picto for a data type
|
||||||
*
|
*
|
||||||
* @param string $key Key
|
* @param string $key Key
|
||||||
|
* @param string $morecss Add more css to the object
|
||||||
* @return string Pïcto for the key
|
* @return string Pïcto for the key
|
||||||
*/
|
*/
|
||||||
function getPictoForType($key)
|
function getPictoForType($key, $morecss = '')
|
||||||
{
|
{
|
||||||
// Set array with type -> picto
|
// Set array with type -> picto
|
||||||
$type2picto = array(
|
$type2picto = array(
|
||||||
@@ -4740,10 +4741,10 @@ function getPictoForType($key)
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (!empty($type2picto[$key])) {
|
if (!empty($type2picto[$key])) {
|
||||||
return img_picto('', $type2picto[$key], 'class="pictofixedwidth"');
|
return img_picto('', $type2picto[$key], 'class="pictofixedwidth'.($morecss ? ' '.$morecss : '').'"');
|
||||||
}
|
}
|
||||||
|
|
||||||
return img_picto('', 'generic', 'class="pictofixedwidth"');
|
return img_picto('', 'generic', 'class="pictofixedwidth'.($morecss ? ' '.$morecss : '').'"');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3931,7 +3931,7 @@ div .tdtop:not(.tagtdnote) {
|
|||||||
vertical-align: top !important;
|
vertical-align: top !important;
|
||||||
/*padding-top: 10px !important;
|
/*padding-top: 10px !important;
|
||||||
padding-bottom: 2px !important; */
|
padding-bottom: 2px !important; */
|
||||||
padding-top: 5px !important;
|
padding-top: 7px !important;
|
||||||
padding-bottom: 0px !important;
|
padding-bottom: 0px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user