From c5f0ac9f29557c9842738f1e637f7c73d2663fcc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 26 Jan 2023 12:07:04 +0100 Subject: [PATCH 1/2] Fix public page for user --- htdocs/public/users/view.php | 26 ++++++++++++++++---------- htdocs/theme/eldy/global.inc.php | 7 +++++++ htdocs/theme/md/style.css.php | 7 +++++++ 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/htdocs/public/users/view.php b/htdocs/public/users/view.php index d63a2a66eee..b0b4b3ae32f 100644 --- a/htdocs/public/users/view.php +++ b/htdocs/public/users/view.php @@ -229,6 +229,12 @@ if ($object->job && !getDolUserInt('USER_PUBLIC_HIDE_JOBPOSITION', 0, $object)) print dol_escape_htmltag($object->job); print ''; } +if (!getDolUserInt('USER_PUBLIC_HIDE_COMPANY', 0, $object)) { + print '
'; + print dol_escape_htmltag($mysoc->name); + print '
'; +} + print ''; @@ -240,7 +246,7 @@ print ''; if (!empty($conf->global->USER_IMAGE_PUBLIC_INTERFACE)) { print '
'; - print ''; + print ''; print '
'; } @@ -292,19 +298,19 @@ if ($object->office_phone && !getDolUserInt('USER_PUBLIC_HIDE_OFFICE_PHONE', 0, $usersection .= '
'; $usersection .= img_picto('', 'phone', 'class="pictofixedwidth"'); $usersection .= dol_print_phone($object->office_phone, $object->country_code, 0, $mysoc->id, 'tel', ' ', 0, ''); - $usersection .= '
'; + $usersection .= '
'; } if ($object->office_fax && !getDolUserInt('USER_PUBLIC_HIDE_OFFICE_FAX', 0, $object)) { $usersection .= '
'; $usersection .= img_picto('', 'phoning_fax', 'class="pictofixedwidth"'); $usersection .= dol_print_phone($object->office_fax, $object->country_code, 0, $mysoc->id, 'fax', ' ', 0, ''); - $usersection .= '
'; + $usersection .= '
'; } if ($object->user_mobile && !getDolUserInt('USER_PUBLIC_HIDE_USER_MOBILE', 0, $object)) { $usersection .= '
'; $usersection .= img_picto('', 'phone', 'class="pictofixedwidth"'); $usersection .= dol_print_phone($object->user_mobile, $object->country_code, 0, $mysoc->id, 'tel', ' ', 0, ''); - $usersection .= '
'; + $usersection .= '
'; } // Social networks @@ -324,7 +330,7 @@ if ($usersection) { // Output payment summary form print ''; - print '
'; + print '
'; print $usersection; @@ -344,7 +350,7 @@ if (!getDolUserInt('USER_PUBLIC_HIDE_COMPANY', 0, $object)) { $companysection .= '
'; $companysection .= img_picto('', 'email', 'class="pictofixedwidth"'); $companysection .= dol_print_email($mysoc->email, 0, 0, 1); - $companysection .= '
'; + $companysection .= '
'; } if ($mysoc->url) { @@ -358,13 +364,13 @@ if (!getDolUserInt('USER_PUBLIC_HIDE_COMPANY', 0, $object)) { $companysection .= '
'; $companysection .= img_picto('', 'phone', 'class="pictofixedwidth"'); $companysection .= dol_print_phone($mysoc->phone, $mysoc->country_code, 0, $mysoc->id, 'tel', ' ', 0, ''); - $companysection .= '
'; + $companysection .= '
'; } if ($mysoc->fax) { $companysection .= '
'; $companysection .= img_picto('', 'phoning_fax', 'class="pictofixedwidth"'); $companysection .= dol_print_phone($mysoc->fax, $mysoc->country_code, 0, $mysoc->id, 'fax', ' ', 0, ''); - $companysection .= '
'; + $companysection .= '
'; } // Social networks @@ -414,12 +420,12 @@ if (!getDolUserInt('USER_PUBLIC_HIDE_COMPANY', 0, $object)) { // Output payment summary form print ''; - print '
'; + print '
'; // Add company info if ($mysoc->name) { print '
'; - print $mysoc->name; + print dol_escape_htmltag($mysoc->name); print '
'; print '
'; } diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 0b987de469e..e3df53d52cb 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1770,6 +1770,13 @@ select.widthcentpercentminusxx, span.widthcentpercentminusxx:not(.select2-select .smallonsmartphone { font-size: 0.8em; } + + .nopaddingtoponsmartphone { + padding-top: 0 !important; + } + .nopaddingbottomonsmartphone { + padding-bottom: 0 !important; + } } /* Force values for small screen 570 */ diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 0fde8b72044..429940fd537 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1981,6 +1981,13 @@ select.widthcentpercentminusxx, span.widthcentpercentminusxx:not(.select2-select .smallonsmartphone { font-size: 0.8em; } + + .nopaddingtoponsmartphone { + padding-top: 0 !important; + } + .nopaddingbottomonsmartphone { + padding-bottom: 0 !important; + } } /* Force values for small screen 570 */ From 8735894a61e8b4dfb2e383e1b9432bce1796899b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 26 Jan 2023 12:09:33 +0100 Subject: [PATCH 2/2] Fix missing new Form --- htdocs/admin/company_socialnetworks.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/admin/company_socialnetworks.php b/htdocs/admin/company_socialnetworks.php index e9171431187..fb496c1dce1 100644 --- a/htdocs/admin/company_socialnetworks.php +++ b/htdocs/admin/company_socialnetworks.php @@ -84,6 +84,8 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha'))) { * View */ +$form = new Form($db); + $wikihelp = 'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'; llxHeader('', $langs->trans("Setup"), $wikihelp);