mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-16 06:21:28 +01:00
Fix: problme d'affichage de la description si fckeditor est actif mais dsactiv sur les descriptions produits
This commit is contained in:
@@ -2278,19 +2278,19 @@ class Form
|
||||
// Calendrier popup version eldy
|
||||
if ("$conf->use_popup_calendar" == "eldy") // Laisser conf->use_popup_calendar entre quote
|
||||
{
|
||||
// Zone de saisie manuelle de la date
|
||||
print '<input id="'.$prefix.'" name="'.$prefix.'" type="text" size="9" maxlength="11" value="'.$formated_date.'"';
|
||||
print ' onChange="dpChangeDay(\''.$prefix.'\',\''.$conf->format_date_short_java.'\')"';
|
||||
print '>';
|
||||
// Zone de saisie manuelle de la date
|
||||
print '<input id="'.$prefix.'" name="'.$prefix.'" type="text" size="9" maxlength="11" value="'.$formated_date.'"';
|
||||
print ' onChange="dpChangeDay(\''.$prefix.'\',\''.$conf->format_date_short_java.'\')"';
|
||||
print '>';
|
||||
|
||||
// Icone calendrier
|
||||
print '<button id="'.$prefix.'Button" type="button" class="dpInvisibleButtons"';
|
||||
$base=DOL_URL_ROOT.'/lib/';
|
||||
print ' onClick="showDP(\''.$base.'\',\''.$prefix.'\',\''.$conf->format_date_short_java.'\');">'.img_object($langs->trans("SelectDate"),'calendar').'</button>';
|
||||
print '<button id="'.$prefix.'Button" type="button" class="dpInvisibleButtons"';
|
||||
$base=DOL_URL_ROOT.'/lib/';
|
||||
print ' onClick="showDP(\''.$base.'\',\''.$prefix.'\',\''.$conf->format_date_short_java.'\');">'.img_object($langs->trans("SelectDate"),'calendar').'</button>';
|
||||
|
||||
print '<input type="hidden" id="'.$prefix.'day" name="'.$prefix.'day" value="'.$sday.'">'."\n";
|
||||
print '<input type="hidden" id="'.$prefix.'month" name="'.$prefix.'month" value="'.$smonth.'">'."\n";
|
||||
print '<input type="hidden" id="'.$prefix.'year" name="'.$prefix.'year" value="'.$syear.'">'."\n";
|
||||
print '<input type="hidden" id="'.$prefix.'day" name="'.$prefix.'day" value="'.$sday.'">'."\n";
|
||||
print '<input type="hidden" id="'.$prefix.'month" name="'.$prefix.'month" value="'.$smonth.'">'."\n";
|
||||
print '<input type="hidden" id="'.$prefix.'year" name="'.$prefix.'year" value="'.$syear.'">'."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2304,16 +2304,16 @@ class Form
|
||||
print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/lib/lib_calendar.js"></script>';
|
||||
print '<input id="'.$prefix.'" type="text" name="'.$prefix.'" size="10" value="'.$formated_date.'"';
|
||||
print ' onChange="dpChangeDay(\''.$prefix.'\',\''.$conf->format_date_short_java.'\')"';
|
||||
print '> ';
|
||||
print '> ';
|
||||
print '<input type="hidden" id="'.$prefix.'day" name="'.$prefix.'day" value="'.$sday.'">'."\n";
|
||||
print '<input type="hidden" id="'.$prefix.'month" name="'.$prefix.'month" value="'.$smonth.'">'."\n";
|
||||
print '<input type="hidden" id="'.$prefix.'year" name="'.$prefix.'year" value="'.$syear.'">'."\n";
|
||||
print '<input type="hidden" id="'.$prefix.'month" name="'.$prefix.'month" value="'.$smonth.'">'."\n";
|
||||
print '<input type="hidden" id="'.$prefix.'year" name="'.$prefix.'year" value="'.$syear.'">'."\n";
|
||||
if($form_name =="")
|
||||
print '<A HREF="javascript:showCalendar(document.forms[3].'.$prefix.')">'.img_cal().'</a>';
|
||||
else
|
||||
print '<A HREF="javascript:showCalendar(document.forms[\''.$form_name.'\'].'.$prefix.')">'.img_cal().'</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Affiche date en select
|
||||
|
||||
@@ -257,14 +257,14 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
|
||||
$pdf->SetFont('Arial','', 9); // Dans boucle pour g<>rer multi-page
|
||||
|
||||
if ($conf->fckeditor->enabled)
|
||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
|
||||
{
|
||||
$pdf->writeHTMLCell(108, 4, $this->posxdesc-1, $curY, $libelleproduitservice, 0, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$pdf->SetXY ($this->posxdesc-1, $curY);
|
||||
$pdf->MultiCell(108, 4, $libelleproduitservice, 0, 'J');
|
||||
$pdf->MultiCell(108, 4, dol_entity_decode($libelleproduitservice), 0, 'J');
|
||||
}
|
||||
|
||||
$nexY = $pdf->GetY();
|
||||
|
||||
@@ -259,14 +259,14 @@ class pdf_crabe extends ModelePDFFactures
|
||||
|
||||
$pdf->SetFont('Arial','', 9); // Dans boucle pour g<>rer multi-page
|
||||
|
||||
if ($conf->fckeditor->enabled)
|
||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
|
||||
{
|
||||
$pdf->writeHTMLCell(108, 4, $this->posxdesc-1, $curY, $libelleproduitservice, 0, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$pdf->SetXY ($this->posxdesc-1, $curY);
|
||||
$pdf->MultiCell(108, 4, $libelleproduitservice, 0, 'J');
|
||||
$pdf->MultiCell(108, 4, dol_entity_decode($libelleproduitservice), 0, 'J');
|
||||
}
|
||||
|
||||
$nexY = $pdf->GetY();
|
||||
|
||||
@@ -256,14 +256,14 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
|
||||
$pdf->SetFont('Arial','', 9); // Dans boucle pour g<>rer multi-page
|
||||
|
||||
if ($conf->fckeditor->enabled)
|
||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
|
||||
{
|
||||
$pdf->writeHTMLCell(108, 4, $this->posxdesc-1, $curY, $libelleproduitservice, 0, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$pdf->SetXY ($this->posxdesc-1, $curY);
|
||||
$pdf->MultiCell(108, 4, $libelleproduitservice, 0, 'J');
|
||||
$pdf->MultiCell(108, 4, dol_entity_decode($libelleproduitservice), 0, 'J');
|
||||
}
|
||||
|
||||
$nexY = $pdf->GetY();
|
||||
|
||||
@@ -2298,14 +2298,25 @@ function weight_units_string($unit)
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Nettoie le code HTML
|
||||
\brief Decode le code html
|
||||
\param string StringHtml
|
||||
\return string DecodeString
|
||||
*/
|
||||
function dol_entity_decode($StringHtml)
|
||||
{
|
||||
$DecodeString = html_entity_decode($StringHtml);
|
||||
return $DecodeString;
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Supprime le code html
|
||||
\param string StringHtml
|
||||
\return string CleanString
|
||||
*/
|
||||
function clean_html($StringHtml)
|
||||
{
|
||||
$pattern = "<[^>]+>";
|
||||
$temp = html_entity_decode($StringHtml);
|
||||
$temp = dol_entity_decode($StringHtml);
|
||||
$temp = ereg_replace($pattern,"",$temp);
|
||||
// Supprime aussi les retours
|
||||
$temp=str_replace("\n"," ",$temp);
|
||||
|
||||
Reference in New Issue
Block a user