diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index d90974d72d3..f6d4dec026b 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -9556,7 +9556,7 @@ abstract class CommonObject
$labeltoshow = $langs->trans($label);
$helptoshow = $langs->trans($extrafields->attributes[$this->table_element]['help'][$key]);
if ($display_type == 'card') {
- $out .= '
';
}
- print '| |
';
+ print ' |
';
// Address
print '| ';
@@ -1661,7 +1661,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
// Phone / Fax
print ' |
| '.$form->editfieldkey('Phone', 'phone', '', $object, 0).' | ';
- print 'browser->layout == 'phone' ? ' colspan="3"' : '').'>'.img_picto('', 'object_phoning', 'class="pictofixedwidth"').' | ';
+ print 'browser->layout == 'phone' ? ' colspan="3"' : '').'>'.img_picto('', 'object_phoning', 'class="pictofixedwidth"').' | ';
if ($conf->browser->layout == 'phone') {
print '
';
@@ -1669,20 +1669,20 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
// Phone mobile
print '| '.$form->editfieldkey('PhoneMobile', 'phone_mobile', '', $object, 0).' | ';
- print 'browser->layout == 'phone' ? ' colspan="3"' : '').'>'.img_picto('', 'object_phoning_mobile', 'class="pictofixedwidth"').' |
';
+ print 'browser->layout == 'phone' ? ' colspan="3"' : '').'>'.img_picto('', 'object_phoning_mobile', 'class="pictofixedwidth"').' | ';
// Fax
print '';
print '| '.$form->editfieldkey('Fax', 'fax', '', $object, 0).' | ';
- print 'browser->layout == 'phone' ? ' colspan="3"' : '').'>'.img_picto('', 'object_phoning_fax', 'class="pictofixedwidth"').' |
';
+ print 'browser->layout == 'phone' ? ' colspan="3"' : '').'>'.img_picto('', 'object_phoning_fax', 'class="pictofixedwidth"').' | ';
// URL
print '| '.$form->editfieldkey('Web', 'url', '', $object, 0).' | ';
- print ''.img_picto('', 'globe', 'class="pictofixedwidth"').' |
';
+ print ''.img_picto('', 'globe', 'class="pictofixedwidth"').' | ';
// Email
print '| '.$form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '', getDolGlobalInt('SOCIETE_EMAIL_MANDATORY')).' | ';
- print 'browser->layout == 'phone') || !isModEnabled('mailing') ? ' colspan="3"' : '').'>'.img_picto('', 'object_email', 'class="pictofixedwidth"').' | ';
+ print 'browser->layout == 'phone') || !isModEnabled('mailing') ? ' colspan="3"' : '').'>'.img_picto('', 'object_email', 'class="pictofixedwidth"').' | ';
// Unsubscribe
if (isModEnabled('mailing')) {
@@ -1881,7 +1881,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
if (!getDolGlobalString('SOCIETE_DISABLE_WORKFORCE')) {
print '';
if ($conf->browser->layout == 'phone') {
- print '
';
+ print '
';
}
print '| '.$form->editfieldkey('Workforce', 'effectif_id', '', $object, 0).' | browser->layout == 'phone' ? ' colspan="3"' : '').'>';
print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id, 0, 0, 0, '', 0, 0, 0, '', '', 1);
@@ -2002,14 +2002,14 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
$("document").ready(function() { toogleMoreFields(false); });
jQuery(".morefieldslnk").click(function() {
- console.log("Click on link");
+ console.log("Click on link .morefieldslnk (create)");
toogleMoreFields(true);
return false;
});
function toogleMoreFields(chgCookieState) {
const lnk = $("#morefieldslnk");
- const items = $(".morefields, .trextrafields");
+ const items = $(".morefields, .trextrafields:not(.trextrafieldsgroup)");
var cookieState = document.cookie.split(";").some((item) => item.trim().startsWith("DOLUSER_MOREFIELDS_SHOW=true")) == true;
if (!chgCookieState) cookieState = !cookieState ;
@@ -2483,7 +2483,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
//$colspan = ($conf->browser->layout == 'phone' ? 2 : 4);
$colspan = 4;
- print ' |
| |
';
+ print ' |
';
// Address
print '| '.$form->editfieldkey('Address', 'address', '', $object, 0).' | ';
@@ -2529,20 +2529,20 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
// Phone / Fax
print '
| '.$form->editfieldkey('Phone', 'phone', GETPOST('phone', 'alpha'), $object, 0).' | ';
- print 'browser->layout == 'phone' ? ' colspan="3"' : '').'>'.img_picto('', 'object_phoning', 'class="pictofixedwidth"').' | ';
+ print 'browser->layout == 'phone' ? ' colspan="3"' : '').'>'.img_picto('', 'object_phoning', 'class="pictofixedwidth"').' | ';
if ($conf->browser->layout == 'phone') {
print '
';
}
print '| '.$form->editfieldkey('PhoneMobile', 'phone_mobile', GETPOST('phone_mobile', 'alpha'), $object, 0).' | ';
- print 'browser->layout == 'phone' ? ' colspan="3"' : '').'>'.img_picto('', 'object_phoning_mobile', 'class="pictofixedwidth"').' |
';
+ print 'browser->layout == 'phone' ? ' colspan="3"' : '').'>'.img_picto('', 'object_phoning_mobile', 'class="pictofixedwidth"').' | ';
print ''.$form->editfieldkey('Fax', 'fax', GETPOST('fax', 'alpha'), $object, 0).' | ';
- print 'browser->layout == 'phone' ? ' colspan="3"' : '').'>'.img_picto('', 'object_phoning_fax', 'class="pictofixedwidth"').' | ';
+ print 'browser->layout == 'phone' ? ' colspan="3"' : '').'>'.img_picto('', 'object_phoning_fax', 'class="pictofixedwidth"').' | ';
print '';
// Web
print '| '.$form->editfieldkey('Web', 'url', GETPOST('url', 'alpha'), $object, 0).' | ';
- print ''.img_picto('', 'globe', 'class="pictofixedwidth"').' |
';
+ print ''.img_picto('', 'globe', 'class="pictofixedwidth"').' | ';
// EMail
print '| '.$form->editfieldkey('EMail', 'email', GETPOST('email', 'alpha'), $object, 0, 'string', '', (getDolGlobalInt('SOCIETE_EMAIL_MANDATORY'))).' | ';
@@ -2752,7 +2752,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
if (!getDolGlobalString('SOCIETE_DISABLE_WORKFORCE')) {
print '';
if ($conf->browser->layout == 'phone') {
- print '
';
+ print '
';
}
print '| '.$form->editfieldkey('Workforce', 'effectif_id', '', $object, 0).' | ';
print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id, 0, 0, 0, '', 0, 0, 0, '', '', 1);
@@ -2817,9 +2817,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
$parameters = array('socid' => $socid, 'colspan' => ' colspan="3"', 'colspanvalue' => '3');
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php';
+ print ' |
|
';
+
// Parent company
if (!getDolGlobalString('SOCIETE_DISABLE_PARENTCOMPANY')) {
- print '';
+ print '
';
print '| '.$langs->trans('ParentCompany').' | ';
print '';
print img_picto('', 'company', 'class="pictofixedwidth"');
@@ -2827,8 +2829,20 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
print ' |
';
}
+ // Assign sale representative
+ print '';
+ print '| '.$form->editfieldkey('AllocateCommercial', 'commercial_id', '', $object, 0).' | ';
+ print '';
+ $userlist = $form->select_dolusers('', '', 0, null, 0, '', '', '0', 0, 0, 'u.statut:=:1', 0, '', '', 0, 1);
+ $arrayselected = GETPOST('commercial', 'array');
+ if (empty($arrayselected)) {
+ $arrayselected = $object->getSalesRepresentatives($user, 1);
+ }
+ print img_picto('', 'user', 'class="pictofixedwidth"').$form->multiselectarray('commercial', $userlist, $arrayselected, 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0, '', '', '', 1);
+ print ' |
';
+
// Logo
- print '';
+ print '
';
print '| '.$form->editfieldkey('Logo', 'photoinput', '', $object, 0).' | ';
print '';
if ($object->logo) {
@@ -2857,32 +2871,20 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
print ' | ';
print '
';
- // Assign sale representative
- print '';
- print '| '.$form->editfieldkey('AllocateCommercial', 'commercial_id', '', $object, 0).' | ';
- print '';
- $userlist = $form->select_dolusers('', '', 0, null, 0, '', '', '0', 0, 0, 'u.statut:=:1', 0, '', '', 0, 1);
- $arrayselected = GETPOST('commercial', 'array');
- if (empty($arrayselected)) {
- $arrayselected = $object->getSalesRepresentatives($user, 1);
- }
- print img_picto('', 'user', 'class="pictofixedwidth"').$form->multiselectarray('commercial', $userlist, $arrayselected, 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0, '', '', '', 1);
- print ' |
';
-
- print '';
+ print ''."\n";
print '