Debug v15

This commit is contained in:
Laurent Destailleur 2022-01-05 10:43:05 +01:00
parent 3581dda876
commit 5b8d6e60e4
9 changed files with 48 additions and 53 deletions

View File

@ -2176,9 +2176,10 @@ class Adherent extends CommonObject
$linkend = '';
if (!empty($this->photo)) {
$label .= '<div class="photointooltip">';
$label .= Form::showphoto('memberphoto', $this, 80, 0, 0, 'photowithmargin photologintooltip', 'small', 0, 1);
$label .= '</div><div style="clear: both;"></div>';
$label .= '<div class="photointooltip floatright">';
$label .= Form::showphoto('memberphoto', $this, 80, 0, 0, 'photoref photowithmargin photologintooltip', 'small', 0, 1);
$label .= '</div>';
//$label .= '<div style="clear: both;"></div>';
}
$label .= '<div class="centpercent">';

View File

@ -1404,9 +1404,10 @@ class Contact extends CommonObject
$result = ''; $label = '';
if (!empty($this->photo) && class_exists('Form')) {
$label .= '<div class="photointooltip">';
$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 .= '</div><div style="clear: both;"></div>';
$label .= '<div class="photointooltip floatright">';
$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 .= '</div>';
//$label .= '<div style="clear: both;"></div>';
}
$label .= img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("Contact").'</u>';

View File

@ -261,7 +261,7 @@ $doleditor->Create();
print '</td></tr>';
print '<tr class="oddeven"><td>';
print '<tr class="oddeven"><td class="fieldrequired">';
print $langs->trans("ONLINE_PAYMENT_SENDEMAIL").'</td><td>';
print '<input size="32" type="text" name="ONLINE_PAYMENT_SENDEMAIL" value="'.$conf->global->ONLINE_PAYMENT_SENDEMAIL.'">';
print ' &nbsp; <span class="opacitymedium">'.$langs->trans("Example").': myemail@myserver.com, Payment service &lt;myemail2@myserver2.com&gt;</span>';

View File

@ -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 .= '<div class="photointooltip">';
$label .= '<div class="photointooltip floatright">';
$label .= $tmpphoto;
$label .= '</div><div style="clear: both;"></div>';
$label .= '</div>';
//$label .= '<div style="clear: both;"></div>';
}
}

View File

@ -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 '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">';
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">';
// Currency
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
} else {
print '<b>'.price($amount).'</b>';
print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency
print '<input type="hidden" name="amount" value="'.$amount.'">';
print '<input type="hidden" name="newamount" value="'.$amount.'">';
}
// Currency
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
print '<input type="hidden" name="currency" value="'.$currency.'">';
print '</td></tr>'."\n";
@ -1085,13 +1084,13 @@ if ($source == 'order') {
if (empty($amount) || !is_numeric($amount)) {
print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">';
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">';
// Currency
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
} else {
print '<b>'.price($amount).'</b>';
print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency
print '<input type="hidden" name="amount" value="'.$amount.'">';
print '<input type="hidden" name="newamount" value="'.$amount.'">';
}
// Currency
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
print '<input type="hidden" name="currency" value="'.$currency.'">';
print '</td></tr>'."\n";
@ -1216,18 +1215,16 @@ if ($source == 'invoice') {
if (empty($amount) || !is_numeric($amount)) {
print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">';
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">';
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
} else {
print '<b>'.price($amount).'</b>';
print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency
print '<input type="hidden" name="amount" value="'.$amount.'">';
print '<input type="hidden" name="newamount" value="'.$amount.'">';
}
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
print '<input type="hidden" name="currency" value="'.$currency.'">';
} else {
print '<b>'.price($object->total_ttc, 1, $langs).'</b>';
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
print '<input type="hidden" name="currency" value="'.$currency.'">';
print '<b class="amount">'.price($object->total_ttc, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency
}
print '<input type="hidden" name="currency" value="'.$currency.'">';
print '</td></tr>'."\n";
// Tag
@ -1420,13 +1417,13 @@ if ($source == 'contractline') {
if (empty($amount) || !is_numeric($amount)) {
print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">';
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">';
// Currency
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
} else {
print '<b>'.price($amount).'</b>';
print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency
print '<input type="hidden" name="amount" value="'.$amount.'">';
print '<input type="hidden" name="newamount" value="'.$amount.'">';
}
// Currency
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
print '<input type="hidden" name="currency" value="'.$currency.'">';
print '</td></tr>'."\n";
@ -1652,23 +1649,22 @@ if ($source == 'member' || $source == 'membersubscription') {
}
print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">';
if (empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)) {
print '<input class="flat maxwidth75" type="text" name="newamountbis" value="'.$valtoshow.'" disabled>';
print '<input class="flat maxwidth75" type="text" name="newamountbis" value="'.$valtoshow.'" disabled="disabled">';
print '<input type="hidden" name="newamount" value="'.$valtoshow.'">';
} else {
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.$valtoshow.'">';
}
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
} else {
$valtoshow = $amount;
if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) {
$valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow);
$amount = $valtoshow;
}
print '<b>'.price($valtoshow).'</b>';
print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency
print '<input type="hidden" name="amount" value="'.$valtoshow.'">';
print '<input type="hidden" name="newamount" value="'.$valtoshow.'">';
}
// Currency
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
print '<input type="hidden" name="currency" value="'.$currency.'">';
print '</td></tr>'."\n";
@ -1813,18 +1809,18 @@ if ($source == 'donation') {
}
print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">';
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.$valtoshow.'">';
// Currency
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
} else {
$valtoshow = $amount;
if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) {
$valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow);
$amount = $valtoshow;
}
print '<b>'.price($valtoshow).'</b>';
print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency
print '<input type="hidden" name="amount" value="'.$valtoshow.'">';
print '<input type="hidden" name="newamount" value="'.$valtoshow.'">';
}
// Currency
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
print '<input type="hidden" name="currency" value="'.$currency.'">';
print '</td></tr>'."\n";
@ -1913,12 +1909,9 @@ if ($source == 'organizedeventregistration') {
print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Amount");
print '</td><td class="CTableRow2">';
$valtoshow = $amount;
print '<b>'.price($valtoshow).'</b>';
print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency
print '<input type="hidden" name="amount" value="'.$valtoshow.'">';
print '<input type="hidden" name="newamount" value="'.$valtoshow.'">';
// Currency
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
print '<input type="hidden" name="currency" value="'.$currency.'">';
print '</td></tr>'."\n";
@ -1999,12 +1992,9 @@ if ($source == 'boothlocation') {
print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Amount");
print '</td><td class="CTableRow2">';
$valtoshow = $amount;
print '<b>'.price($valtoshow).'</b>';
print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency
print '<input type="hidden" name="amount" value="'.$valtoshow.'">';
print '<input type="hidden" name="newamount" value="'.$valtoshow.'">';
// Currency
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
print '<input type="hidden" name="currency" value="'.$currency.'">';
print '</td></tr>'."\n";

View File

@ -2566,9 +2566,10 @@ class Societe extends CommonObject
$linkstart = ''; $linkend = '';
if (!empty($this->logo) && class_exists('Form')) {
$label .= '<div class="photointooltip">';
$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 .= '</div><div style="clear: both;"></div>';
$label .= '<div class="photointooltip floatright">';
$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 .= '</div>';
//$label .= '<div style="clear: both;"></div>';
} elseif (!empty($this->logo_squarred) && class_exists('Form')) {
/*$label.= '<div class="photointooltip">';
$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.

View File

@ -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 {

View File

@ -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 {

View File

@ -2596,9 +2596,10 @@ class User extends CommonObject
$companylink = '';
if (!empty($this->photo)) {
$label .= '<div class="photointooltip">';
$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 .= '</div><div style="clear: both;"></div>';
$label .= '<div class="photointooltip floatright">';
$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 .= '</div>';
//$label .= '<div style="clear: both;"></div>';
}
// Info Login