From 758c6a62635cd45f18d54cc7424368850be46540 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 29 Mar 2023 17:06:19 +0200 Subject: [PATCH] colspan war --- htdocs/contact/card.php | 1 + htdocs/contact/perso.php | 83 ++++++++++++++++++++--------------- htdocs/langs/en_US/other.lang | 1 + htdocs/societe/card.php | 2 +- 4 files changed, 50 insertions(+), 37 deletions(-) diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 7197eabb19c..cbdce0c5d04 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -680,6 +680,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print 'lastname).'" autofocus="autofocus">'; print ''; + // Firstname print ''; print ''; diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 0fd23753fdf..ba5fde87468 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -27,6 +27,7 @@ // Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/contact.lib.php'; // Load translation files required by the page @@ -42,6 +43,9 @@ if ($user->socid) { $result = restrictedArea($user, 'contact', $id, 'socpeople&societe'); $object = new Contact($db); +$errors = array(); + + /* * Action */ @@ -123,6 +127,7 @@ $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('', $title, $help_url); $form = new Form($db); +$formcompany = new FormCompany($db); $object->fetch($id, $user); @@ -143,38 +148,13 @@ if ($action == 'edit') { print ''; // Ref - print ''; - // Photo - print ''; - // Name - print ''; - print ''; + print ''; + print ''; // Company if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { @@ -182,31 +162,62 @@ if ($action == 'edit') { $objsoc = new Societe($db); $objsoc->fetch($object->socid); - print ''; + print ''; } else { - print ''; } } // Civility - print ''; + // Photo + print ''; + print ''; + print ''; + print ''; + // Date To Birth print ''; - - print ''; + print ''; } else { - print ''; + print ''; } + print ''; print ''; print "
'.$langs->trans("Ref").''; + print '
'.$langs->trans("Ref").''; print $object->id; print ''; - print $form->showphoto('contact', $object)."\n"; - if ($object->photo) { - print "
\n"; - } - - print ''; - - if ($object->photo) { - print ''; - } - print ''; - print ''; - print '
'.$langs->trans("Delete").'

'.$langs->trans("PhotoFile").'
'; - $maxfilesizearray = getMaxFileSizeArray(); - $maxmin = $maxfilesizearray['maxmin']; - if ($maxmin > 0) { - print ''; // MAX_FILE_SIZE must precede the field type=file - } - print ''; - print '
'; - - print '
'.$langs->trans("Lastname").' / '.$langs->trans("Label").''.$object->lastname.'
'.$langs->trans("Firstname").''.$object->firstname.'
'.$langs->trans("Lastname").' / '.$langs->trans("Label").''.$object->lastname.'
'.$langs->trans("Firstname").''.$object->firstname.'
'.$langs->trans("ThirdParty").''.$objsoc->getNomUrl(1).'
'.$langs->trans("ThirdParty").''.$objsoc->getNomUrl(1).'
'.$langs->trans("ThirdParty").''; + print '
'.$langs->trans("ThirdParty").''; print $langs->trans("ContactNotLinkedToCompany"); print '
'.$langs->trans("UserTitle").''; + print '
'; print $object->getCivilityLabel(); + //print $formcompany->select_civility(GETPOSTISSET("civility_code") ? GETPOST("civility_code", 'alpha') : $object->civility_code, 'civility_code'); print '
'.$form->editfieldkey('PhotoFile', 'photoinput', '', $object, 0).''; + if ($object->photo) { + print $form->showphoto('contact', $object); + } + $caneditfield = 1; + if ($caneditfield) { + if ($object->photo) { + print "
\n"; + } + print ''; + if ($object->photo) { + print ''; + } + //print ''; + print ''; + print '
'.$langs->trans("PhotoFile").'
'; + $maxfilesizearray = getMaxFileSizeArray(); + $maxmin = $maxfilesizearray['maxmin']; + if ($maxmin > 0) { + print ''; // MAX_FILE_SIZE must precede the field type=file + } + print ''; + print '
'; + } + print '
'.$langs->trans("DateOfBirth").''; $form = new Form($db); print $form->selectDate($object->birthday, 'birthday', 0, 0, 1, "perso", 1, 0); - print ''.$langs->trans("Alert").': '; + print '     '; + print ' '; if (!empty($object->birthday_alert)) { - print '
"; diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index e2d46564ea2..cd9d2a6589c 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -5,6 +5,7 @@ Tools=Tools TMenuTools=Tools ToolsDesc=All tools not included in other menu entries are grouped here.
All the tools can be accessed via the left menu. Birthday=Birthday +BirthdayAlert=Birthday alert BirthdayAlertOn=birthday alert active BirthdayAlertOff=birthday alert inactive TransKey=Translation of the key TransKey diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index d298c34719d..cc901a8bbe2 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -2618,7 +2618,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } print ''; if ($object->logo) { - print ''; + print ''; } //print ''; print '
'.$langs->trans("Delete").'

'.$langs->trans("PhotoFile").'
';