Work on task #10579 : Simplify code using editor
This commit is contained in:
parent
657db6cc47
commit
554abc46c7
@ -121,19 +121,11 @@ if ($id)
|
|||||||
{
|
{
|
||||||
print "<input type=\"hidden\" name=\"action\" value=\"update\">";
|
print "<input type=\"hidden\" name=\"action\" value=\"update\">";
|
||||||
print "<input type=\"hidden\" name=\"id\" value=\"".$adh->id."\">";
|
print "<input type=\"hidden\" name=\"id\" value=\"".$adh->id."\">";
|
||||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_MEMBER)
|
|
||||||
{
|
|
||||||
// Editeur wysiwyg
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
$doleditor=new DolEditor('note',$adh->note,280,'dolibarr_notes','In',true);
|
$doleditor=new DolEditor('note',$adh->note,280,'dolibarr_notes','',true,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_MEMBER,10,80);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
print '<textarea name="note" cols="80" rows="10">'.dol_htmlentitiesbr_decode($adh->note).'</textarea>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
print nl2br($adh->note);
|
print nl2br($adh->note);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -228,18 +228,9 @@ if ($_GET["action"] == 'create')
|
|||||||
print "<textarea name=\"comment\" wrap=\"soft\" cols=\"60\" rows=\"3\"></textarea></td></tr>";
|
print "<textarea name=\"comment\" wrap=\"soft\" cols=\"60\" rows=\"3\"></textarea></td></tr>";
|
||||||
|
|
||||||
print '<tr><td valign="top">'.$langs->trans("WelcomeEMail").'</td><td>';
|
print '<tr><td valign="top">'.$langs->trans("WelcomeEMail").'</td><td>';
|
||||||
if ($conf->fckeditor->enabled)
|
|
||||||
{
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
$doleditor=new DolEditor('mail_valid',$adht->mail_valid,280,'dolibarr_notes','',false);
|
$doleditor=new DolEditor('mail_valid',$adht->mail_valid,280,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,15,90);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<textarea class="flat" name="mail_valid" rows="15" cols="90">';
|
|
||||||
print dol_htmlentitiesbr_decode($adht->mail_valid);
|
|
||||||
print '</textarea>';
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
@ -616,18 +607,9 @@ if ($rowid > 0)
|
|||||||
print "<textarea name=\"comment\" wrap=\"soft\" cols=\"90\" rows=\"3\">".$adht->note."</textarea></td></tr>";
|
print "<textarea name=\"comment\" wrap=\"soft\" cols=\"90\" rows=\"3\">".$adht->note."</textarea></td></tr>";
|
||||||
|
|
||||||
print '<tr><td valign="top">'.$langs->trans("WelcomeEMail").'</td><td>';
|
print '<tr><td valign="top">'.$langs->trans("WelcomeEMail").'</td><td>';
|
||||||
if ($conf->fckeditor->enabled)
|
|
||||||
{
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
$doleditor=new DolEditor('mail_valid',$adht->mail_valid,280,'dolibarr_notes','',false);
|
$doleditor=new DolEditor('mail_valid',$adht->mail_valid,280,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,15,90);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<textarea class="flat" name="mail_valid" rows="15" cols="90">';
|
|
||||||
print dol_htmlentitiesbr_decode($adht->mail_valid);
|
|
||||||
print '</textarea>';
|
|
||||||
}
|
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
print '<tr><td colspan="2" align="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"> ';
|
print '<tr><td colspan="2" align="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"> ';
|
||||||
|
|||||||
@ -258,33 +258,18 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') // Edit
|
|||||||
// Message on login page
|
// Message on login page
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageLogin").'</td><td colspan="2">';
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageLogin").'</td><td colspan="2">';
|
||||||
if ($conf->fckeditor->enabled)
|
|
||||||
{
|
|
||||||
// Editeur wysiwyg
|
// Editeur wysiwyg
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
$doleditor=new DolEditor('main_home',$conf->global->MAIN_HOME,158,'dolibarr_notes','In',false);
|
$doleditor=new DolEditor('main_home',$conf->global->MAIN_HOME,158,'dolibarr_notes','In',false,true,$conf->fckeditor->enabled,ROWS_5,90);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<textarea name="main_home" cols="90" rows="'.ROWS_5.'">'.dol_htmlentitiesbr_decode($conf->global->MAIN_HOME).'</textarea>';
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Message of the day on home page
|
// Message of the day on home page
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageOfDay").'</td><td colspan="2">';
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageOfDay").'</td><td colspan="2">';
|
||||||
if ($conf->fckeditor->enabled)
|
|
||||||
{
|
|
||||||
// Editeur wysiwyg
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
$doleditor=new DolEditor('main_motd',$conf->global->MAIN_MOTD,158,'dolibarr_notes','In',false);
|
$doleditor=new DolEditor('main_motd',$conf->global->MAIN_MOTD,158,'dolibarr_notes','In',false,true,$conf->fckeditor->enabled,ROWS_5,90);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<textarea name="main_motd" cols="90" rows="'.ROWS_5.'">'.dol_htmlentitiesbr_decode($conf->global->MAIN_MOTD).'</textarea>';
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -134,20 +134,9 @@ print '</tr>';
|
|||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td width="25%">'.$langs->trans("Description").'</td>';
|
print '<td width="25%">'.$langs->trans("Description").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
|
|
||||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC)
|
|
||||||
{
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
$doleditor=new DolEditor('description',$categorie->description,200,'dolibarr_notes');
|
$doleditor=new DolEditor('description',$categorie->description,200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,ROWS_6,50);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<textarea name="description" rows="'.ROWS_6.'" cols="50">';
|
|
||||||
print dol_htmlentitiesbr_decode($categorie->description);
|
|
||||||
print '</textarea>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|||||||
@ -231,20 +231,9 @@ if ($user->rights->categorie->creer)
|
|||||||
print '<td width="25%" class="fieldrequired">'.$langs->trans("Ref").'</td><td><input name="nom" size="25" value="'.$categorie->label.'">';
|
print '<td width="25%" class="fieldrequired">'.$langs->trans("Ref").'</td><td><input name="nom" size="25" value="'.$categorie->label.'">';
|
||||||
print'</td></tr>';
|
print'</td></tr>';
|
||||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
|
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
|
||||||
|
|
||||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC)
|
|
||||||
{
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
$doleditor=new DolEditor('description',$categorie->description,200,'dolibarr_notes');
|
$doleditor=new DolEditor('description',$categorie->description,200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,ROWS_6,50);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<textarea name="description" rows="'.ROWS_6.'" cols="50">';
|
|
||||||
print dol_htmlentitiesbr_decode($categorie->description);
|
|
||||||
print '</textarea>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans ("AddIn").'</td><td>';
|
print '<tr><td>'.$langs->trans ("AddIn").'</td><td>';
|
||||||
|
|||||||
@ -579,17 +579,9 @@ if (GETPOST('action') == 'create')
|
|||||||
|
|
||||||
// Note
|
// Note
|
||||||
print '<tr><td valign="top">'.$langs->trans("Note").'</td><td>';
|
print '<tr><td valign="top">'.$langs->trans("Note").'</td><td>';
|
||||||
if ($conf->fckeditor->enabled)
|
|
||||||
{
|
|
||||||
// Editeur wysiwyg
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
$doleditor=new DolEditor('note',($_POST["note"]?$_POST["note"]:$actioncomm->note),280,'dolibarr_notes','In',true);
|
$doleditor=new DolEditor('note',($_POST["note"]?$_POST["note"]:$actioncomm->note),280,'dolibarr_notes','In',true,$conf->fckeditor->enabled,ROWS_7,90);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<textarea name="note" cols="90" rows="'.ROWS_7.'">'.($_POST["note"]?$_POST["note"]:$actioncomm->note).'</textarea>';
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
@ -762,18 +754,10 @@ if ($_GET["id"])
|
|||||||
|
|
||||||
// Note
|
// Note
|
||||||
print '<tr><td valign="top">'.$langs->trans("Note").'</td><td colspan="3">';
|
print '<tr><td valign="top">'.$langs->trans("Note").'</td><td colspan="3">';
|
||||||
if ($conf->fckeditor->enabled)
|
|
||||||
{
|
|
||||||
// Editeur wysiwyg
|
// Editeur wysiwyg
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
$doleditor=new DolEditor('note',$act->note,240,'dolibarr_notes','In',true);
|
$doleditor=new DolEditor('note',$act->note,240,'dolibarr_notes','In',true,true,$conf->fckeditor->enabled,ROWS_7,90);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<textarea name="note" cols="90" rows="'.ROWS_7.'">'.dol_htmlentitiesbr_decode($act->note).'</textarea>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
@ -625,16 +625,9 @@ if ($_GET["action"] == 'create')
|
|||||||
print '</i></td>';
|
print '</i></td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
// Editeur wysiwyg
|
// Editeur wysiwyg
|
||||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_MAILING)
|
|
||||||
{
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
$doleditor=new DolEditor('body',$_POST['body'],320,'dolibarr_mailings','',true,true);
|
$doleditor=new DolEditor('body',$_POST['body'],320,'dolibarr_mailings','',true,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_MAILING,20,70);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<textarea cols="70" rows="20" name="body" value="'.$_POST['body'].'"></textarea>';
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
@ -1014,17 +1007,9 @@ else
|
|||||||
print '</i></td>';
|
print '</i></td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
// Editeur wysiwyg
|
// Editeur wysiwyg
|
||||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_MAILING)
|
|
||||||
{
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
$doleditor=new DolEditor('body',$mil->body,320,'dolibarr_mailings','',true,true);
|
$doleditor=new DolEditor('body',$mil->body,320,'dolibarr_mailings','',true,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_MAILING,20,70);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<textarea class="flat" name="body" cols="70" rows="20">';
|
|
||||||
print dol_htmlentitiesbr_decode($mil->body).'</textarea>';
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td colspan="4" align="center">';
|
print '<tr><td colspan="4" align="center">';
|
||||||
|
|||||||
@ -274,18 +274,9 @@ if ($_REQUEST["action"] == 'create')
|
|||||||
print '<tr><td valign="top">'.$langs->trans("Comment").'</td>';
|
print '<tr><td valign="top">'.$langs->trans("Comment").'</td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
// Editor wysiwyg
|
// Editor wysiwyg
|
||||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_SOCIETE)
|
|
||||||
{
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
$doleditor=new DolEditor('account_comment',$account->comment,200,'dolibarr_notes','',false);
|
$doleditor=new DolEditor('account_comment',$account->comment,200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_SOCIETE,10,70);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<textarea class="flat" name="account_comment" cols="70" rows="10">';
|
|
||||||
print dol_htmlentitiesbr_decode($account->comment);
|
|
||||||
print '</textarea>';
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Sold
|
// Sold
|
||||||
@ -567,17 +558,9 @@ else
|
|||||||
print '<tr><td valign="top">'.$langs->trans("Comment").'</td>';
|
print '<tr><td valign="top">'.$langs->trans("Comment").'</td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
// Editor wysiwyg
|
// Editor wysiwyg
|
||||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_SOCIETE)
|
|
||||||
{
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
$doleditor=new DolEditor('account_comment',(isset($_POST["account_comment"])?$_POST["account_comment"]:$account->comment),200,'dolibarr_notes','',false);
|
$doleditor=new DolEditor('account_comment',(isset($_POST["account_comment"])?$_POST["account_comment"]:$account->comment),200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_SOCIETE,10,70);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<textarea class="flat" name="account_comment" cols="70" rows="10">';
|
|
||||||
print dol_htmlentitiesbr_decode(isset($_POST["account_comment"])?$_POST["account_comment"]:$account->comment).'</textarea>';
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td align="center" colspan="4"><input value="'.$langs->trans("Modify").'" type="submit" class="button">';
|
print '<tr><td align="center" colspan="4"><input value="'.$langs->trans("Modify").'" type="submit" class="button">';
|
||||||
|
|||||||
@ -2922,20 +2922,10 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Description - Editor wysiwyg
|
// Description - Editor wysiwyg
|
||||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
|
|
||||||
{
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
|
||||||
$doleditor=new DolEditor('desc',$objp->description,164,'dolibarr_details');
|
|
||||||
$doleditor->Create();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$nbrows=ROWS_2;
|
$nbrows=ROWS_2;
|
||||||
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
print '<textarea name="desc" class="flat" cols="70" rows="'.$nbrows.'">';
|
$doleditor=new DolEditor('desc',$objp->description,164,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
|
||||||
print dol_htmlentitiesbr_decode($objp->description);
|
$doleditor->Create();
|
||||||
print '</textarea>';
|
|
||||||
}
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// VAT
|
// VAT
|
||||||
|
|||||||
@ -1324,7 +1324,7 @@ class CommonObject
|
|||||||
/**
|
/**
|
||||||
* Return HTML with selected object line
|
* Return HTML with selected object line
|
||||||
* @param line Selected object line
|
* @param line Selected object line
|
||||||
* TODO mettre le html dans un template
|
* TODO Move this into a html class, not a business class
|
||||||
*/
|
*/
|
||||||
function printLine($line,$var=true,$num=0,$i=0,$dateSelector=0)
|
function printLine($line,$var=true,$num=0,$i=0,$dateSelector=0)
|
||||||
{
|
{
|
||||||
@ -1514,20 +1514,12 @@ class CommonObject
|
|||||||
}
|
}
|
||||||
if ($_GET["action"] == 'editline')
|
if ($_GET["action"] == 'editline')
|
||||||
{
|
{
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
|
||||||
// editeur wysiwyg
|
// editeur wysiwyg
|
||||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
|
|
||||||
{
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
|
||||||
$doleditor=new DolEditor('desc',$line->description,164,'dolibarr_details');
|
|
||||||
$doleditor->Create();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$nbrows=ROWS_2;
|
$nbrows=ROWS_2;
|
||||||
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
|
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
|
||||||
print '<textarea name="desc" cols="70" class="flat" rows="'.$nbrows.'">'.dol_htmlentitiesbr_decode($line->description).'</textarea>';
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
}
|
$doleditor=new DolEditor('desc',$line->description,164,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
|
||||||
|
$doleditor->Create();
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -484,22 +484,12 @@ class FormMail
|
|||||||
print '<input type="hidden" name="message" value="'.$defaultmessage.'">';
|
print '<input type="hidden" name="message" value="'.$defaultmessage.'">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
if ($this->withfckeditor)
|
|
||||||
{
|
{
|
||||||
// Editeur wysiwyg
|
// Editeur wysiwyg
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
$doleditor=new DolEditor('message',$defaultmessage,280,'dolibarr_notes','In',true);
|
$doleditor=new DolEditor('message',$defaultmessage,280,'dolibarr_notes','In',true,false,$this->withfckeditor,8,72);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<textarea cols="72" rows="8" name="message">';
|
|
||||||
print $defaultmessage;
|
|
||||||
print '</textarea>';
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -47,18 +47,11 @@ if ($conf->global->PRODUIT_USE_MARKUP) $colspan = 'colspan="2"';
|
|||||||
if ($conf->product->enabled && $conf->service->enabled) echo '<br>';
|
if ($conf->product->enabled && $conf->service->enabled) echo '<br>';
|
||||||
|
|
||||||
// Editor wysiwyg
|
// Editor wysiwyg
|
||||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
|
|
||||||
{
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
$doleditor=new DolEditor('dp_desc',$_POST["dp_desc"],100,'dolibarr_details');
|
|
||||||
$doleditor->Create();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$nbrows=ROWS_2;
|
$nbrows=ROWS_2;
|
||||||
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
|
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
|
||||||
echo '<textarea class="flat" cols="70" name="dp_desc" rows="'.$nbrows.'">'.$_POST["dp_desc"].'</textarea>';
|
$doleditor=new DolEditor('dp_desc',$_POST["dp_desc"],100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
|
||||||
}
|
$doleditor->Create();
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|||||||
@ -60,18 +60,11 @@ $colspan = 'colspan="3"';
|
|||||||
if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '<br>';
|
if (! $conf->global->PRODUIT_USE_SEARCH_TO_SELECT) print '<br>';
|
||||||
|
|
||||||
// Editor wysiwyg
|
// Editor wysiwyg
|
||||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
|
|
||||||
{
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
$doleditor=new DolEditor('np_desc',$_POST["np_desc"],100,'dolibarr_details');
|
|
||||||
$doleditor->Create();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$nbrows=ROWS_2;
|
$nbrows=ROWS_2;
|
||||||
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
|
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
|
||||||
echo '<textarea cols="70" name="np_desc" rows="'.$nbrows.'" class="flat">'.$_POST["np_desc"].'</textarea>';
|
$doleditor=new DolEditor('np_desc',$_POST["np_desc"],100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
|
||||||
}
|
$doleditor->Create();
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td align="right"><input type="text" size="2" name="qty" value="1"></td>
|
<td align="right"><input type="text" size="2" name="qty" value="1"></td>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user