From 5b8d6e60e4069626c04515a953f93df6c21723f9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 5 Jan 2022 10:43:05 +0100 Subject: [PATCH] Debug v15 --- htdocs/adherents/class/adherent.class.php | 7 +-- htdocs/contact/class/contact.class.php | 7 +-- htdocs/paybox/admin/paybox.php | 2 +- htdocs/product/class/product.class.php | 5 +- htdocs/public/payment/newpayment.php | 62 ++++++++++------------- htdocs/societe/class/societe.class.php | 7 +-- htdocs/theme/eldy/global.inc.php | 2 +- htdocs/theme/md/style.css.php | 2 +- htdocs/user/class/user.class.php | 7 +-- 9 files changed, 48 insertions(+), 53 deletions(-) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 324e3cdc491..1d12ad16194 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -2176,9 +2176,10 @@ class Adherent extends CommonObject $linkend = ''; if (!empty($this->photo)) { - $label .= '
'; - $label .= Form::showphoto('memberphoto', $this, 80, 0, 0, 'photowithmargin photologintooltip', 'small', 0, 1); - $label .= '
'; + $label .= '
'; + $label .= Form::showphoto('memberphoto', $this, 80, 0, 0, 'photoref photowithmargin photologintooltip', 'small', 0, 1); + $label .= '
'; + //$label .= '
'; } $label .= '
'; diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index fa1dfb93c7a..bc3441a6dc2 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -1404,9 +1404,10 @@ class Contact extends CommonObject $result = ''; $label = ''; if (!empty($this->photo) && class_exists('Form')) { - $label .= '
'; - $label .= Form::showphoto('contact', $this, 0, 40, 0, '', 'mini', 0); // Important, we must force height so image will have height tags and if image is inside a tooltip, the tooltip manager can calculate height and position correctly the tooltip. - $label .= '
'; + $label .= '
'; + $label .= Form::showphoto('contact', $this, 0, 40, 0, 'photoref', 'mini', 0); // Important, we must force height so image will have height tags and if image is inside a tooltip, the tooltip manager can calculate height and position correctly the tooltip. + $label .= '
'; + //$label .= '
'; } $label .= img_picto('', $this->picto).' '.$langs->trans("Contact").''; diff --git a/htdocs/paybox/admin/paybox.php b/htdocs/paybox/admin/paybox.php index bcad50de457..9fddfffab8d 100644 --- a/htdocs/paybox/admin/paybox.php +++ b/htdocs/paybox/admin/paybox.php @@ -261,7 +261,7 @@ $doleditor->Create(); print ''; -print ''; +print ''; print $langs->trans("ONLINE_PAYMENT_SENDEMAIL").''; print ''; print '   '.$langs->trans("Example").': myemail@myserver.com, Payment service <myemail2@myserver2.com>'; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index a7865474014..27b2bdaff2c 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -4800,9 +4800,10 @@ class Product extends CommonObject if (!empty($this->entity)) { $tmpphoto = $this->show_photos('product', $conf->product->multidir_output[$this->entity], 1, 1, 0, 0, 0, 80); if ($this->nbphoto > 0) { - $label .= '
'; + $label .= '
'; $label .= $tmpphoto; - $label .= '
'; + $label .= '
'; + //$label .= '
'; } } diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index d00aa9c4be0..5158e294fb2 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -247,7 +247,6 @@ $urlok = preg_replace('/&$/', '', $urlok); // Remove last & $urlko = preg_replace('/&$/', '', $urlko); // Remove last & - // Make special controls if ((empty($paymentmethod) || $paymentmethod == 'paypal') && !empty($conf->paypal->enabled)) { @@ -442,21 +441,21 @@ if ($action == 'dopayment') { $origfulltag = GETPOST("fulltag", 'alpha'); // Securekey into back url useless for back url and we need an url lower than 150. - $urlok = preg_replace('/securekey=[^&]+/', '', $urlok); - $urlko = preg_replace('/securekey=[^&]+/', '', $urlko); + $urlok = preg_replace('/securekey=[^&]+&?/', '', $urlok); + $urlko = preg_replace('/securekey=[^&]+&?/', '', $urlko); if (empty($PRICE) || !is_numeric($PRICE)) { $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Amount")); } elseif (empty($email)) { - $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("YourEMail")); + $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ONLINE_PAYMENT_SENDEMAIL")); } elseif (!isValidEMail($email)) { $mesg = $langs->trans("ErrorBadEMail", $email); } elseif (!$origfulltag) { $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PaymentCode")); } elseif (dol_strlen($urlok) > 150) { - $mesg = 'Error urlok too long '.$urlok.'( Paybox requires 150, found '.strlen($urlok).')'; + $mesg = 'Error urlok too long '.$urlok.' (Paybox requires 150, found '.strlen($urlok).')'; } elseif (dol_strlen($urlko) > 150) { - $mesg = 'Error urlko too long '.$urlko.'( Paybox requires 150, found '.strlen($urlok).')'; + $mesg = 'Error urlko too long '.$urlko.' (Paybox requires 150, found '.strlen($urlok).')'; } if (empty($mesg)) { @@ -986,13 +985,13 @@ if (!$source) { if (empty($amount) || !is_numeric($amount)) { print ''; print ''; + // Currency + print ' '.$langs->trans("Currency".$currency).''; } else { - print ''.price($amount).''; + print ''.price($amount, 1, $langs, 1, -1, -1, $currency).''; // Price with currency print ''; print ''; } - // Currency - print ' '.$langs->trans("Currency".$currency).''; print ''; print ''."\n"; @@ -1085,13 +1084,13 @@ if ($source == 'order') { if (empty($amount) || !is_numeric($amount)) { print ''; print ''; + // Currency + print ' '.$langs->trans("Currency".$currency).''; } else { - print ''.price($amount).''; + print ''.price($amount, 1, $langs, 1, -1, -1, $currency).''; // Price with currency print ''; print ''; } - // Currency - print ' '.$langs->trans("Currency".$currency).''; print ''; print ''."\n"; @@ -1216,18 +1215,16 @@ if ($source == 'invoice') { if (empty($amount) || !is_numeric($amount)) { print ''; print ''; + print ' '.$langs->trans("Currency".$currency).''; } else { - print ''.price($amount).''; + print ''.price($amount, 1, $langs, 1, -1, -1, $currency).''; // Price with currency print ''; print ''; } - print ' '.$langs->trans("Currency".$currency).''; - print ''; } else { - print ''.price($object->total_ttc, 1, $langs).''; - print ' '.$langs->trans("Currency".$currency).''; - print ''; + print ''.price($object->total_ttc, 1, $langs, 1, -1, -1, $currency).''; // Price with currency } + print ''; print ''."\n"; // Tag @@ -1420,13 +1417,13 @@ if ($source == 'contractline') { if (empty($amount) || !is_numeric($amount)) { print ''; print ''; + // Currency + print ' '.$langs->trans("Currency".$currency).''; } else { - print ''.price($amount).''; + print ''.price($amount, 1, $langs, 1, -1, -1, $currency).''; // Price with currency print ''; print ''; } - // Currency - print ' '.$langs->trans("Currency".$currency).''; print ''; print ''."\n"; @@ -1652,23 +1649,22 @@ if ($source == 'member' || $source == 'membersubscription') { } print ''; if (empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)) { - print ''; + print ''; print ''; } else { print ''; } + print ' '.$langs->trans("Currency".$currency).''; } else { $valtoshow = $amount; if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) { $valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow); $amount = $valtoshow; } - print ''.price($valtoshow).''; + print ''.price($valtoshow, 1, $langs, 1, -1, -1, $currency).''; // Price with currency print ''; print ''; } - // Currency - print ' '.$langs->trans("Currency".$currency).''; print ''; print ''."\n"; @@ -1813,18 +1809,18 @@ if ($source == 'donation') { } print ''; print ''; + // Currency + print ' '.$langs->trans("Currency".$currency).''; } else { $valtoshow = $amount; if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) { $valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow); $amount = $valtoshow; } - print ''.price($valtoshow).''; + print ''.price($valtoshow, 1, $langs, 1, -1, -1, $currency).''; // Price with currency print ''; print ''; } - // Currency - print ' '.$langs->trans("Currency".$currency).''; print ''; print ''."\n"; @@ -1913,12 +1909,9 @@ if ($source == 'organizedeventregistration') { print ''.$langs->trans("Amount"); print ''; $valtoshow = $amount; - print ''.price($valtoshow).''; + print ''.price($valtoshow, 1, $langs, 1, -1, -1, $currency).''; // Price with currency print ''; print ''; - - // Currency - print ' '.$langs->trans("Currency".$currency).''; print ''; print ''."\n"; @@ -1999,12 +1992,9 @@ if ($source == 'boothlocation') { print ''.$langs->trans("Amount"); print ''; $valtoshow = $amount; - print ''.price($valtoshow).''; + print ''.price($valtoshow, 1, $langs, 1, -1, -1, $currency).''; // Price with currency print ''; print ''; - - // Currency - print ' '.$langs->trans("Currency".$currency).''; print ''; print ''."\n"; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index ed18ec208f0..6f05462a2c8 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2566,9 +2566,10 @@ class Societe extends CommonObject $linkstart = ''; $linkend = ''; if (!empty($this->logo) && class_exists('Form')) { - $label .= '
'; - $label .= Form::showphoto('societe', $this, 0, 40, 0, '', 'mini', 0); // Important, we must force height so image will have height tags and if image is inside a tooltip, the tooltip manager can calculate height and position correctly the tooltip. - $label .= '
'; + $label .= '
'; + $label .= Form::showphoto('societe', $this, 0, 40, 0, 'photoref', 'mini', 0); // Important, we must force height so image will have height tags and if image is inside a tooltip, the tooltip manager can calculate height and position correctly the tooltip. + $label .= '
'; + //$label .= '
'; } elseif (!empty($this->logo_squarred) && class_exists('Form')) { /*$label.= '
'; $label.= Form::showphoto('societe', $this, 0, 40, 0, 'photowithmargin', 'mini', 0); // Important, we must force height so image will have height tags and if image is inside a tooltip, the tooltip manager can calculate height and position correctly the tooltip. diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 760fb0f7966..ba2fb388b69 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -390,7 +390,7 @@ td.rightborder { border-right: 1px solid #ccc; } -td.amount, span.amount, div.amount { +td.amount, span.amount, div.amount, b.amount { color: #006666; } td.actionbuttons a { diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index bcc02e3ce39..716414c5f3b 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -590,7 +590,7 @@ td.rightborder { border-right: 1px solid #ccc; } -td.amount, span.amount, div.amount { +td.amount, span.amount, div.amount, b.amount { color: #006666; } td.actionbuttons a { diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index aa9ca1285ed..d9d8f5dd6da 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -2596,9 +2596,10 @@ class User extends CommonObject $companylink = ''; if (!empty($this->photo)) { - $label .= '
'; - $label .= Form::showphoto('userphoto', $this, 0, 60, 0, 'photowithmargin photologintooltip', 'small', 0, 1); // Force height to 60 so we total height of tooltip can be calculated and collision can be managed - $label .= '
'; + $label .= '
'; + $label .= Form::showphoto('userphoto', $this, 0, 60, 0, 'photoref photowithmargin photologintooltip', 'small', 0, 1); // Force height to 60 so we total height of tooltip can be calculated and collision can be managed + $label .= '
'; + //$label .= '
'; } // Info Login