diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index a5daa628f3b..81010cbf800 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -373,7 +373,7 @@ function form_constantes($tableau) else if (in_array($const,array('ADHERENT_AUTOREGISTER_MAIL','ADHERENT_MAIL_VALID','ADHERENT_MAIL_COTIS','ADHERENT_MAIL_RESIL'))) { require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('constvalue'.$const,$obj->value,160,'dolibarr_notes','',false,false,$conf->fckeditor->enabled,5,60); + $doleditor=new DolEditor('constvalue'.$const,$obj->value,'',160,'dolibarr_notes','',false,false,$conf->fckeditor->enabled,5,60); $doleditor->Create(); print ''; diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index 5024e021ffb..9bf6aba401c 100644 --- a/htdocs/adherents/note.php +++ b/htdocs/adherents/note.php @@ -122,7 +122,7 @@ if ($id) print ""; print "id."\">"; require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('note',$adh->note,280,'dolibarr_notes','',true,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_MEMBER,10,80); + $doleditor=new DolEditor('note',$adh->note,'',280,'dolibarr_notes','',true,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_MEMBER,10,80); $doleditor->Create(); } else diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 0620571f1b4..98af9040d79 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -233,7 +233,7 @@ if ($_GET["action"] == 'create') print ''.$langs->trans("WelcomeEMail").''; require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('mail_valid',$adht->mail_valid,280,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,15,90); + $doleditor=new DolEditor('mail_valid',$adht->mail_valid,'',280,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,15,90); $doleditor->Create(); print ''; @@ -612,7 +612,7 @@ if ($rowid > 0) print ''.$langs->trans("WelcomeEMail").''; require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('mail_valid',$adht->mail_valid,280,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,15,90); + $doleditor=new DolEditor('mail_valid',$adht->mail_valid,'',280,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,15,90); $doleditor->Create(); print ""; diff --git a/htdocs/admin/fckeditor.php b/htdocs/admin/fckeditor.php index 2473039a81f..833924295cb 100644 --- a/htdocs/admin/fckeditor.php +++ b/htdocs/admin/fckeditor.php @@ -161,7 +161,7 @@ print '
'."\n"; print ''; print_fiche_titre($langs->trans("TestSubmitForm"),'',''); print '
'."\n"; -$editor=new DolEditor('formtestfield',isset($conf->global->FCKEDITOR_TEST)?$conf->global->FCKEDITOR_TEST:'Test',200,'dolibarr_notes','In', true); +$editor=new DolEditor('formtestfield',isset($conf->global->FCKEDITOR_TEST)?$conf->global->FCKEDITOR_TEST:'Test','',200,'dolibarr_notes','In', true); $editor->Create(); print '
'."\n"; print '
'."\n"; diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index ed8b55b2d7b..4ef41861e74 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -267,7 +267,7 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') // Edit print ''.$langs->trans("MessageLogin").''; // Editeur wysiwyg require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('main_home',$conf->global->MAIN_HOME,142,'dolibarr_notes','In',false,true,true,ROWS_4,90); + $doleditor=new DolEditor('main_home',$conf->global->MAIN_HOME,'',142,'dolibarr_notes','In',false,true,true,ROWS_4,90); $doleditor->Create(); print ''."\n"; @@ -275,7 +275,7 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') // Edit $var=!$var; print ''.$langs->trans("MessageOfDay").''; require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('main_motd',$conf->global->MAIN_MOTD,142,'dolibarr_notes','In',false,true,true,ROWS_4,90); + $doleditor=new DolEditor('main_motd',$conf->global->MAIN_MOTD,'',142,'dolibarr_notes','In',false,true,true,ROWS_4,90); $doleditor->Create(); print ''."\n"; diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php index f8cc6443b1a..2c7928027ee 100644 --- a/htdocs/categories/edit.php +++ b/htdocs/categories/edit.php @@ -131,7 +131,7 @@ print ''; print ''.$langs->trans("Description").''; print ''; require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); -$doleditor=new DolEditor('description',$categorie->description,200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,ROWS_6,50); +$doleditor=new DolEditor('description',$categorie->description,'',200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,ROWS_6,50); $doleditor->Create(); print ''; diff --git a/htdocs/categories/fiche.php b/htdocs/categories/fiche.php index b0b9245d7a4..aac7b55eea6 100644 --- a/htdocs/categories/fiche.php +++ b/htdocs/categories/fiche.php @@ -229,7 +229,7 @@ if ($user->rights->categorie->creer) // Description print ''.$langs->trans("Description").''; require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('description',$categorie->description,200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,ROWS_6,50); + $doleditor=new DolEditor('description',$categorie->description,'',200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,ROWS_6,50); $doleditor->Create(); print ''; diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 0186e44e429..9927dab5452 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -610,7 +610,7 @@ if (GETPOST('action') == 'create') // Description print ''.$langs->trans("Description").''; require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('note',($_POST["note"]?$_POST["note"]:$actioncomm->note),280,'dolibarr_notes','In',true,true,$conf->fckeditor->enabled,ROWS_7,90); + $doleditor=new DolEditor('note',($_POST["note"]?$_POST["note"]:$actioncomm->note),'',280,'dolibarr_notes','In',true,true,$conf->fckeditor->enabled,ROWS_7,90); $doleditor->Create(); print ''; @@ -824,7 +824,7 @@ if ($id) print ''.$langs->trans("Description").''; // Editeur wysiwyg require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('note',$act->note,240,'dolibarr_notes','In',true,true,$conf->fckeditor->enabled,ROWS_5,90); + $doleditor=new DolEditor('note',$act->note,'',240,'dolibarr_notes','In',true,true,$conf->fckeditor->enabled,ROWS_5,90); $doleditor->Create(); print ''; diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php index 5d5a6c57e32..4ff84ea25ac 100644 --- a/htdocs/comm/mailing/fiche.php +++ b/htdocs/comm/mailing/fiche.php @@ -635,7 +635,7 @@ if ($_GET["action"] == 'create') print ''; // Editeur wysiwyg require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('body',$_POST['body'],320,'dolibarr_mailings','',true,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_MAILING,20,70); + $doleditor=new DolEditor('body',$_POST['body'],'',320,'dolibarr_mailings','',true,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_MAILING,20,70); $doleditor->Create(); print ''; print ''; @@ -1038,7 +1038,7 @@ else print ''; // Editeur wysiwyg require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('body',$mil->body,320,'dolibarr_mailings','',true,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_MAILING,20,70); + $doleditor=new DolEditor('body',$mil->body,'',320,'dolibarr_mailings','',true,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_MAILING,20,70); $doleditor->Create(); print ''; diff --git a/htdocs/compta/bank/fiche.php b/htdocs/compta/bank/fiche.php index 1547c6a94f1..7d7625ba54e 100644 --- a/htdocs/compta/bank/fiche.php +++ b/htdocs/compta/bank/fiche.php @@ -275,7 +275,7 @@ if ($_REQUEST["action"] == 'create') print ''; // Editor wysiwyg require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('account_comment',$account->comment,200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_SOCIETE,10,70); + $doleditor=new DolEditor('account_comment',$account->comment,'',200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_SOCIETE,10,70); $doleditor->Create(); print ''; @@ -559,7 +559,7 @@ else print ''; // Editor wysiwyg 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,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_SOCIETE,10,70); + $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(); print ''; diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index b96e89ae481..622efdd532e 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -488,7 +488,7 @@ class FormMail { // Editeur wysiwyg require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('message',$defaultmessage,280,'dolibarr_notes','In',true,false,$this->withfckeditor,8,72); + $doleditor=new DolEditor('message',$defaultmessage,'',280,'dolibarr_notes','In',true,false,$this->withfckeditor,8,72); $doleditor->Create(); } print "\n"; diff --git a/htdocs/core/tpl/freeproductline_create.tpl.php b/htdocs/core/tpl/freeproductline_create.tpl.php index 66688b69190..db94a5510de 100644 --- a/htdocs/core/tpl/freeproductline_create.tpl.php +++ b/htdocs/core/tpl/freeproductline_create.tpl.php @@ -56,7 +56,7 @@ if ($conf->global->PRODUIT_USE_MARKUP) $colspan = 'colspan="2"'; require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); $nbrows=ROWS_2; if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; - $doleditor=new DolEditor('dp_desc',$_POST["dp_desc"],100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); + $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(); ?> diff --git a/htdocs/core/tpl/freeproductline_edit.tpl.php b/htdocs/core/tpl/freeproductline_edit.tpl.php index 6ef0df4fe48..e490b677343 100644 --- a/htdocs/core/tpl/freeproductline_edit.tpl.php +++ b/htdocs/core/tpl/freeproductline_edit.tpl.php @@ -43,7 +43,7 @@ $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"); - $doleditor=new DolEditor('desc',$line->description,164,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); + $doleditor=new DolEditor('desc',$line->description,'',164,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); $doleditor->Create(); ?> diff --git a/htdocs/core/tpl/predefinedproductline_create.tpl.php b/htdocs/core/tpl/predefinedproductline_create.tpl.php index c5338fcf6cd..76d68f604ec 100644 --- a/htdocs/core/tpl/predefinedproductline_create.tpl.php +++ b/htdocs/core/tpl/predefinedproductline_create.tpl.php @@ -70,7 +70,7 @@ $colspan = 'colspan="3"'; require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); $nbrows=ROWS_2; if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; - $doleditor=new DolEditor('np_desc',$_POST["np_desc"],100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); + $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(); ?> diff --git a/htdocs/core/tpl/predefinedproductline_edit.tpl.php b/htdocs/core/tpl/predefinedproductline_edit.tpl.php index d94fe2b6c0e..d2cac20e659 100644 --- a/htdocs/core/tpl/predefinedproductline_edit.tpl.php +++ b/htdocs/core/tpl/predefinedproductline_edit.tpl.php @@ -52,7 +52,7 @@ $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"); - $doleditor=new DolEditor('desc',$line->description,164,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); + $doleditor=new DolEditor('desc',$line->description,'',164,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); $doleditor->Create(); ?> diff --git a/htdocs/custom2/milestone/class/actions_milestone.class.php b/htdocs/custom2/milestone/class/actions_milestone.class.php new file mode 100644 index 00000000000..fbdbe8e8474 --- /dev/null +++ b/htdocs/custom2/milestone/class/actions_milestone.class.php @@ -0,0 +1,438 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * \file htdocs/milestone/class/actions_milestone.class.php + * \ingroup milestone + * \brief Fichier de la classe des jalons + * \version $Id$ + */ + + +/** + * \class ActionsMilestone + * \brief Classe permettant la gestion des jalons + */ +class ActionsMilestone +{ + var $db; + var $error; + var $element='milestone'; + var $table_element='milestone'; + + // Id of module + var $module_number=1790; + + var $id; + var $label; + var $description; + var $priority; + + var $object; + var $objParent; + var $elementid; + var $elementtype; + + var $rang; + var $rangtouse; + + var $datec; + var $dateo; + var $datee; + + var $lines=array(); // Tableau en memoire des jalons + + + /** + * Constructor + * @param DB acces base de donnees + * @param id milestone id + */ + function ActionsMilestone($DB) + { + $this->db = $DB; + } + + /** + * Return HTML form for add a milestone + */ + function formAddObject($object) + { + global $conf,$langs; + global $bcnd,$var; + + $langs->load('@milestone'); + + dol_include_once('/milestone/tpl/addmilestoneform.tpl.php'); + } + + /** + * Return HTML with selected milestone + * @param object Parent object + * TODO mettre le html dans un template + */ + function printObjectLine($object,$line,$num=0,$i=0) + { + global $conf,$langs,$user; + global $html,$bc,$bcnd; + + $return = $this->object->fetch($object,$line); + + $element = $object->element; + // TODO uniformiser + if ($element == 'propal') $element = 'propale'; + + // Ligne en mode visu + if ($_GET['action'] != 'editline' || $_GET['lineid'] != $line->rowid) + { + print ''; + + print ''; + print ''; // ancre pour retourner sur la ligne; + + $text = img_object($langs->trans('Milestone'),'milestone@milestone'); + $text.= ' '.$this->object->label.'
'; + $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($line->description)); + print $html->textwithtooltip($text,$description,3,'','',$i); + + // Show range + //print_date_range($line->date_start,$line->date_end); + + // Add description in form + if ($conf->global->PRODUIT_DESC_IN_FORM) + { + print ($line->description?'
'.dol_htmlentitiesbr($line->description):''); + } + + print "\n"; + + // Icone d'edition et suppression + if ($object->statut == 0 && $user->rights->$element->creer) + { + print ''; + print 'rowid.'#'.$line->rowid.'">'; + print img_edit(); + print ''; + print ''; + print ''; + print 'rowid.'">'; + print img_delete(); + print ''; + if ($num > 1) + { + print ''; + if ($i > 0) + { + print 'rowid.'">'; + print img_up(); + print ''; + } + if ($i < $num-1) + { + print 'rowid.'">'; + print img_down(); + print ''; + } + print ''; + } + } + else + { + print ' '; + } + + print ''; + } + + // Ligne en mode update + if ($object->statut == 0 && $_GET["action"] == 'editline' && $user->rights->$element->creer && $_GET["lineid"] == $line->rowid) + { + print '
rowid.'" method="POST">'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + + print ''; + print ''; + print ''; // ancre pour retourner sur la ligne + + // Label + print ''; + print ''; + print ''; + print ''; + + print ''; + print '
'; + + print ''; + + // Description + print ''; + print ''; + + // Editor wysiwyg + require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); + $nbrows=ROWS_2; + if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; + $doleditor=new DolEditor('description',$line->description,'',100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); + $doleditor->Create(); + + print ''; + print '' . "\n"; + + print "
\n"; + } + } + + /** + * Return HTML with origin selected milestone + * @param object Parent object + * TODO mettre le html dans un template + */ + function printOriginObjectLine($line,$i=0) + { + global $conf,$langs; + global $html, $bc; + + // Ligne en mode visu + if ($_GET['action'] != 'editline' || $_GET['lineid'] != $line->rowid) + { + print ''; + + print ''; + + $text = img_object($langs->trans('Milestone'),'milestone@milestone'); + $text.= ' '.$line->desc.'
'; + $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($line->desc)); + print $html->textwithtooltip($text,$description,3,'','',$i); + + print "\n"; + + print ''; + } + } + + /** + * Return action of hook + * @param object Linked object + */ + function doActions($objParent) + { + global $conf,$user,$langs; + global $html; + + $element = $objParent->element; + // TODO uniformiser + if ($element == 'propal') $element = 'propale'; + + /* + * Add milestone + */ + if ($_POST['action'] == 'addmilestone' && $user->rights->milestone->creer && $user->rights->$element->creer) + { + if ($_POST['milestone_label'] == $langs->trans('Label') || $_POST['milestone_desc'] == $langs->trans('Description')) + { + $this->error = '
'.$langs->trans("MilestoneFieldsIsRequired").'
'; + } + else + { + $id = ( GETPOST("id") ? GETPOST("id") : GETPOST("facid") ); + + $objParent->fetch($id); + + $linemax = $objParent->line_max(); + $rangtouse = $linemax+1; + + $this->object->objParent = $objParent; + $this->object->label = $_POST['milestone_label']; + $this->object->description = $_POST['milestone_desc']; + $this->object->product_type = $_POST['product_type']; + $this->object->special_code = $_POST['special_code']; + $this->object->rang = $rangtouse; + + $ret = $this->object->create($user); + + if ($ret < 0) + { + $this->error = '
'.$this->object->error.'
'; + } + else + { + Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$objParent->id); + exit; + } + } + } + + /* + * Update Milestone + */ + if ($_POST['action'] == 'updatemilestone' && $user->rights->milestone->creer && $user->rights->$element->creer && $_POST["save"] == $langs->trans("Save")) + { + $id = $_GET["id"]?$_GET["id"]:$_GET["facid"]; + + if (! $objParent->fetch($id) > 0) + { + dol_print_error($db,$objParent->error); + exit; + } + + $objParent->fetch_thirdparty(); + + $this->object->objParent = $objParent; + $this->object->id = $_POST['lineid']; + $this->object->label = $_POST['label']; + $this->object->description = $_POST['description']; + $this->object->product_type = $_POST['product_type']; + $this->object->special_code = $_POST['special_code']; + + $result = $this->object->update($user); + + // Define output language + $outputlangs = $langs; + $newlang=''; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id']; + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$objParent->client->default_lang; + if (! empty($newlang)) + { + $outputlangs = new Translate("",$conf); + $outputlangs->setDefaultLang($newlang); + } + //propale_pdf_create($db, $propal->id, $propal->modelpdf, $outputlangs); + } + + // Remove line + if ($_REQUEST['action'] == 'confirm_deletemilestone' && $_REQUEST['confirm'] == 'yes' && $user->rights->milestone->creer && $user->rights->$element->creer) + { + $id = $_GET["id"]?$_GET["id"]:$_GET["facid"]; + + $objParent->fetch($id); + $objParent->fetch_thirdparty(); + + $this->object->objParent = $objParent; + + $result = $this->object->delete($_GET['lineid']); + + // reorder lines + if ($result) $objParent->line_order(true); + + // Define output language + $outputlangs = $langs; + $newlang=''; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id']; + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$objParent->client->default_lang; + if (! empty($newlang)) + { + $outputlangs = new Translate("",$conf); + $outputlangs->setDefaultLang($newlang); + } + //propale_pdf_create($db, $propal->id, $propal->modelpdf, $outputlangs); + + if ($objParent->element != 'facture') Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$objParent->id); + else Header ('Location: '.$_SERVER["PHP_SELF"].'?facid='.$objParent->id); + + exit; + } + } + + /** + * Return line description translated in outputlangs and encoded in UTF8 + * @param objectParent Object parent + * @param $i Current line + * @param outputlang Object lang for output + * @param hideref Hide reference + * @param hidedesc Hide description + */ + function pdf_writelinedesc(&$pdf,$object,$i,$outputlangs,$w,$h,$posx,$posy,$hideref=0,$hidedesc=0) + { + $this->object->fetch($object,$object->lines[$i]); + + $pdf->SetFont('','BU', 9); + + $pdf->SetXY ($posx, $posy); + $pdf->MultiCell($w, $h, $outputlangs->convToOutputCharset($this->object->label), 0, 'L'); + + $nexy = $pdf->GetY(); + + $pdf->SetFont('','I', 9); + $description = dol_htmlentitiesbr($object->lines[$i]->desc,1); + + if ($object->lines[$i]->date_start || $object->lines[$i]->date_end) + { + // Show duration if exists + if ($object->lines[$i]->date_start && $object->lines[$i]->date_end) + { + $period='('.$outputlangs->transnoentitiesnoconv('DateFromTo',dol_print_date($object->lines[$i]->date_start, $format, false, $outputlangs),dol_print_date($object->lines[$i]->date_end, $format, false, $outputlangs)).')'; + } + if ($object->lines[$i]->date_start && ! $object->lines[$i]->date_end) + { + $period='('.$outputlangs->transnoentitiesnoconv('DateFrom',dol_print_date($object->lines[$i]->date_start, $format, false, $outputlangs)).')'; + } + if (! $object->lines[$i]->date_start && $object->lines[$i]->date_end) + { + $period='('.$outputlangs->transnoentitiesnoconv('DateUntil',dol_print_date($object->lines[$i]->date_end, $format, false, $outputlangs)).')'; + } + + $description.="
".dol_htmlentitiesbr($period,1); + } + + $pdf->writeHTMLCell($w, $h, $posx, $nexy+1, $outputlangs->convToOutputCharset($description), 0, 1); + } + + /** + * Load an object from its id and create a new one in database + * @param objFrom From object + * @param idTo To object id + * @return int New id of clone + */ + function createfrom($objFrom,$idTo,$elementTo) + { + global $user; + + $error=0; + + if ((!empty($objFrom) && is_object($objFrom)) && !empty($idTo) && !empty($elementTo)) + { + $classname = ucfirst($elementTo); + $objTo = new $classname($this->db); + $objTo->fetch($idTo); + + $this->object->objParent = $objTo; + + for($i=0; $i < count($objTo->lines); $i++) + { + if ($objTo->lines[$i]->product_type == 9 && $objTo->lines[$i]->special_code == $this->module_number) + { + $this->object->fetch($objFrom,$objFrom->lines[$i]); + $this->object->objParent->line = $objTo->lines[$i]; + $ret = $this->object->create($user,1); + if ($ret < 0) $error++; + } + } + } + + if (! $error) return 1; + else return -1; + } + +} +?> diff --git a/htdocs/custom2/milestone/tpl/addmilestoneform.tpl.php b/htdocs/custom2/milestone/tpl/addmilestoneform.tpl.php new file mode 100644 index 00000000000..d31e36480ae --- /dev/null +++ b/htdocs/custom2/milestone/tpl/addmilestoneform.tpl.php @@ -0,0 +1,82 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ + */ +?> + + + + + + + trans('AddMilestone'); ?> +   + + +
id; ?>" method="POST"> + + + + + + +> + + "> + + + + + + + +> + + + global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; + $doleditor=new DolEditor('milestone_desc',$_POST["milestone_desc"],'',100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); + $doleditor->Create(); + ?> + + + +
+ + diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index e8376dd64b3..9d505e363a4 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -757,7 +757,7 @@ elseif ($fichinterid) // Editeur wysiwyg require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('np_desc',$objp->description,164,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,ROWS_2,70); + $doleditor=new DolEditor('np_desc',$objp->description,'',164,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,ROWS_2,70); $doleditor->Create(); print ''; @@ -812,7 +812,7 @@ elseif ($fichinterid) print ''; // editeur wysiwyg require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('np_desc',$_POST["np_desc"],100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,ROWS_2,70); + $doleditor=new DolEditor('np_desc',$_POST["np_desc"],'',100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,ROWS_2,70); $doleditor->Create(); print ''; diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 48d8d496b85..0196c9da311 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -1108,7 +1108,7 @@ if ($id > 0 || ! empty($ref)) require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); $nbrows=ROWS_2; if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; - $doleditor=new DolEditor('eldesc',$line->description,200,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); + $doleditor=new DolEditor('eldesc',$line->description,'',200,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); $doleditor->Create(); print ''; @@ -1161,7 +1161,7 @@ if ($id > 0 || ! empty($ref)) require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); $nbrows=ROWS_2; if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; - $doleditor=new DolEditor('dp_desc',$_POST["dp_desc"],100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); + $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(); print ''; @@ -1215,7 +1215,7 @@ if ($id > 0 || ! empty($ref)) require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); $nbrows=ROWS_2; if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; - $doleditor=new DolEditor('np_desc',$_POST["np_desc"],100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); + $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(); print ''; diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 2c5ce351d71..bb34e5ee6d2 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -1500,7 +1500,7 @@ else require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); $nbrows=ROWS_2; if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; - $doleditor=new DolEditor('label',$fac->lines[$i]->description,200,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); + $doleditor=new DolEditor('label',$fac->lines[$i]->description,'',200,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); $doleditor->Create(); print ''; @@ -1630,7 +1630,7 @@ else require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); $nbrows=ROWS_2; if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; - $doleditor=new DolEditor('label',GETPOST("label"),100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); + $doleditor=new DolEditor('label',GETPOST("label"),'',100,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); $doleditor->Create(); print ''; diff --git a/htdocs/lib/doleditor.class.php b/htdocs/lib/doleditor.class.php index f2e26b0f7a8..8caf4e079cb 100644 --- a/htdocs/lib/doleditor.class.php +++ b/htdocs/lib/doleditor.class.php @@ -53,7 +53,8 @@ class DolEditor * * @param htmlname Nom formulaire html WYSIWIG * @param content Contenu edition WYSIWIG - * @param height Hauteur en pixel de la zone edition + * @param width Largeur en pixel de la zone edition (auto by default) + * @param height Hauteur en pixel de la zone edition (200px by default) * @param toolbarname Nom barre de menu editeur * @param toolbarlocation Emplacement de la barre de menu : * 'In' chaque fenetre d'edition a la propre barre d'outils @@ -64,7 +65,7 @@ class DolEditor * @param rows Size of rows for textarea tool * @param cols Size of cols for textarea tool */ - function DolEditor($htmlname,$content,$height=200,$toolbarname='Basic',$toolbarlocation='In',$toolbarstartexpanded=false,$uselocalbrowser=true,$okforextendededitor=true,$rows=0,$cols=0) + function DolEditor($htmlname,$content,$width='',$height=200,$toolbarname='Basic',$toolbarlocation='In',$toolbarstartexpanded=false,$uselocalbrowser=true,$okforextendededitor=true,$rows=0,$cols=0) { global $conf,$langs; @@ -89,6 +90,7 @@ class DolEditor $this->editor->BasePath = DOL_URL_ROOT.'/includes/fckeditor/' ; $this->editor->Value = $content; $this->editor->Height = $height; + if (! empty($width)) $this->editor->Width = $width; $this->editor->ToolbarSet = $toolbarname; $this->editor->Config['AutoDetectLanguage'] = 'true'; $this->editor->Config['ToolbarLocation'] = $toolbarlocation ? $toolbarlocation : 'In'; @@ -120,7 +122,7 @@ class DolEditor $this->rows = max(ROWS_3,$rows); $this->cols = max(40,$cols); $this->height = $height; - $this->width = 600; + $this->width = $width; } } @@ -157,7 +159,7 @@ class DolEditor customConfig : \''.DOL_URL_ROOT.'/theme/'.$conf->theme.'/ckeditor/config.js\', toolbar: \''.$this->toolbarname.'\', toolbarStartupExpanded: '.($this->toolbarstartexpanded ? 'true' : 'false').', - //width: '.$this->width.', + width: '.($this->width ? $this->width : '\'\'').', height: '.$this->height.' }); diff --git a/htdocs/paybox/admin/paybox.php b/htdocs/paybox/admin/paybox.php index 5aed431b249..1b0f4c79573 100644 --- a/htdocs/paybox/admin/paybox.php +++ b/htdocs/paybox/admin/paybox.php @@ -166,14 +166,14 @@ print ''; $var=!$var; print ''; print $langs->trans("MessageOK").''; -$doleditor=new DolEditor('PAYBOX_MESSAGE_OK',$conf->global->PAYBOX_MESSAGE_OK,60,'Basic','In',false,true,true,ROWS_2,60); +$doleditor=new DolEditor('PAYBOX_MESSAGE_OK',$conf->global->PAYBOX_MESSAGE_OK,'',60,'Basic','In',false,true,true,ROWS_2,60); $doleditor->Create(); print ''; $var=!$var; print ''; print $langs->trans("MessageKO").''; -$doleditor=new DolEditor('PAYBOX_MESSAGE_KO',$conf->global->PAYBOX_MESSAGE_KO,60,'Basic','In',false,true,true,ROWS_2,60); +$doleditor=new DolEditor('PAYBOX_MESSAGE_KO',$conf->global->PAYBOX_MESSAGE_KO,'',60,'Basic','In',false,true,true,ROWS_2,60); $doleditor->Create(); print ''; diff --git a/htdocs/paypal/admin/paypal.php b/htdocs/paypal/admin/paypal.php index c0c64b04c34..66a5979fdbe 100644 --- a/htdocs/paypal/admin/paypal.php +++ b/htdocs/paypal/admin/paypal.php @@ -167,14 +167,14 @@ print ''; $var=!$var; print ''; print $langs->trans("MessageOK").''; -$doleditor=new DolEditor('PAYPAL_MESSAGE_OK',$conf->global->PAYPAL_MESSAGE_OK,60,'Basic','In',false,true,true,ROWS_2,60); +$doleditor=new DolEditor('PAYPAL_MESSAGE_OK',$conf->global->PAYPAL_MESSAGE_OK,'',60,'Basic','In',false,true,true,ROWS_2,60); $doleditor->Create(); print ''; $var=!$var; print ''; print $langs->trans("MessageKO").''; -$doleditor=new DolEditor('PAYPAL_MESSAGE_KO',$conf->global->PAYPAL_MESSAGE_KO,60,'Basic','In',false,true,true,ROWS_2,60); +$doleditor=new DolEditor('PAYPAL_MESSAGE_KO',$conf->global->PAYPAL_MESSAGE_KO,'',60,'Basic','In',false,true,true,ROWS_2,60); $doleditor->Create(); print ''; diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 9f8771fb9f8..e15cabe5736 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -701,7 +701,7 @@ if ($_GET["action"] == 'create' && ($user->rights->produit->creer || $user->righ print ''.$langs->trans("Description").''; require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('desc',$_POST["desc"],160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,4,90); + $doleditor=new DolEditor('desc',$_POST["desc"],'',160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,4,90); $doleditor->Create(); print ""; @@ -780,7 +780,7 @@ if ($_GET["action"] == 'create' && ($user->rights->produit->creer || $user->righ // Note (invisible sur facture, propales...) print ''.$langs->trans("NoteNotVisibleOnBill").''; require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('note',$_POST["note"],180,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,8,70); + $doleditor=new DolEditor('note',$_POST["note"],'',180,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,8,70); $doleditor->Create(); print ""; @@ -926,7 +926,7 @@ if ($_GET["id"] || $_GET["ref"]) // Description (used in invoice, propal...) print ''.$langs->trans("Description").''; require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('desc',$product->description,160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,4,90); + $doleditor=new DolEditor('desc',$product->description,'',160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,4,90); $doleditor->Create(); print ""; print "\n"; @@ -1021,7 +1021,7 @@ if ($_GET["id"] || $_GET["ref"]) // Note print ''.$langs->trans("NoteNotVisibleOnBill").''; require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('note',$product->note,200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,8,70); + $doleditor=new DolEditor('note',$product->note,'',200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,8,70); $doleditor->Create(); print ""; print ''; diff --git a/htdocs/product/stock/fiche.php b/htdocs/product/stock/fiche.php index 6e27cf9845f..c65c51fe729 100644 --- a/htdocs/product/stock/fiche.php +++ b/htdocs/product/stock/fiche.php @@ -179,7 +179,7 @@ if ($_GET["action"] == 'create') print ''.$langs->trans("Description").''; // Editeur wysiwyg require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('desc',$entrepot->description,180,'dolibarr_notes','In',false,true,$conf->fckeditor->enabled,5,70); + $doleditor=new DolEditor('desc',$entrepot->description,'',180,'dolibarr_notes','In',false,true,$conf->fckeditor->enabled,5,70); $doleditor->Create(); print ''; @@ -471,7 +471,7 @@ else print ''.$langs->trans("Description").''; // Editeur wysiwyg require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('desc',$entrepot->description,180,'dolibarr_notes','In',false,true,$conf->fckeditor->enabled,5,70); + $doleditor=new DolEditor('desc',$entrepot->description,'',180,'dolibarr_notes','In',false,true,$conf->fckeditor->enabled,5,70); $doleditor->Create(); print ''; diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php index c5c004a86b9..7c2e52e5af7 100644 --- a/htdocs/product/traduction.php +++ b/htdocs/product/traduction.php @@ -171,12 +171,12 @@ if ($_GET["action"] == 'edit') print ''.$langs->trans('Label').''; print ''.$langs->trans('Description').''; require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('desc-'.$key.'',$product->multilangs[$key]["description"],160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,3,80); + $doleditor=new DolEditor('desc-'.$key.'',$product->multilangs[$key]["description"],'',160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,3,80); $doleditor->Create(); print ''; print ''.$langs->trans('Note').''; require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('note-'.$key.'',$product->multilangs[$key]["note"],160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,3,80); + $doleditor=new DolEditor('note-'.$key.'',$product->multilangs[$key]["note"],'',160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,3,80); $doleditor->Create(); print ''; print ''; @@ -247,12 +247,12 @@ if ($_GET["action"] == 'add' && ($user->rights->produit->creer || $user->rights- print ''.$langs->trans('Label').''; print ''.$langs->trans('Description').''; require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('desc','',160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,3,80); + $doleditor=new DolEditor('desc','','',160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,3,80); $doleditor->Create(); print ''; print ''.$langs->trans('Note').''; require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('note','',160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,3,80); + $doleditor=new DolEditor('note','','',160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,3,80); $doleditor->Create(); print ''; print ''; diff --git a/htdocs/societe/socnote.php b/htdocs/societe/socnote.php index 45eddba3500..cbaa87cef6c 100644 --- a/htdocs/societe/socnote.php +++ b/htdocs/societe/socnote.php @@ -121,7 +121,7 @@ if ($socid > 0) // Editeur wysiwyg require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('note',$societe->note,360,'dolibarr_notes','In',true,false,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_SOCIETE,20,70); + $doleditor=new DolEditor('note',$societe->note,'',360,'dolibarr_notes','In',true,false,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_SOCIETE,20,70); $doleditor->Create(); } else diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index 0c003ca2c43..3d352d7a41b 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -738,7 +738,7 @@ if (($action == 'create') || ($action == 'adduserldap')) if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_USER) { require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('note','',180,'dolibarr_notes','',false); + $doleditor=new DolEditor('note','','',180,'dolibarr_notes','',false); $doleditor->Create(); } else diff --git a/htdocs/user/group/fiche.php b/htdocs/user/group/fiche.php index 65f48ee89ea..6469d3e6612 100644 --- a/htdocs/user/group/fiche.php +++ b/htdocs/user/group/fiche.php @@ -241,7 +241,7 @@ if ($action == 'create') if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_USER) { require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('note','',240,'dolibarr_notes','',false); + $doleditor=new DolEditor('note','','',240,'dolibarr_notes','',false); $doleditor->Create(); } else @@ -543,7 +543,7 @@ else if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_USER) { require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('note',$group->note,240,'dolibarr_notes','',true); + $doleditor=new DolEditor('note',$group->note,'',240,'dolibarr_notes','',true); $doleditor->Create(); } else diff --git a/htdocs/user/note.php b/htdocs/user/note.php index 7aef7a36eb2..46e54bda603 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -127,7 +127,7 @@ if ($id) { // Editeur wysiwyg require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); - $doleditor=new DolEditor('note',$fuser->note,280,'dolibarr_notes','In',true); + $doleditor=new DolEditor('note',$fuser->note,'',280,'dolibarr_notes','In',true); $doleditor->Create(); } else