diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index 49bafc349f4..b0658c0831d 100644 --- a/htdocs/adherents/note.php +++ b/htdocs/adherents/note.php @@ -137,7 +137,7 @@ if ($id) print ""; print "id."\">"; require_once(DOL_DOCUMENT_ROOT."/core/class/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->global->FCKEDITOR_ENABLE_SOCIETE,10,80); $doleditor->Create(); } else diff --git a/htdocs/admin/fckeditor.php b/htdocs/admin/fckeditor.php index 4dda6f392dd..1186767d5c4 100644 --- a/htdocs/admin/fckeditor.php +++ b/htdocs/admin/fckeditor.php @@ -34,28 +34,22 @@ if (!$user->admin) accessforbidden(); // Constante et traduction de la description du module $modules = array( -'USER' => 'FCKeditorForUsers', -'SOCIETE' => 'FCKeditorForCompany', // TODO Regrouper les 4 parm sur edit notes en 1 seul +'SOCIETE' => 'FCKeditorForCompany', 'PRODUCTDESC' => 'FCKeditorForProduct', -'MEMBER' => 'FCKeditorForMembers', 'MAILING' => 'FCKeditorForMailing', 'DETAILS' => 'FCKeditorForProductDetails', ); // Conditions pour que l'option soit proposee $conditions = array( -'USER' => 1, -'SOCIETE' => $conf->societe->enabled, +'SOCIETE' => 1, 'PRODUCTDESC' => ($conf->product->enabled||$conf->service->enabled), -'MEMBER' => $conf->adherent->enabled, 'MAILING' => $conf->mailing->enabled, 'DETAILS' => ($conf->facture->enabled||$conf->propal->enabled||$conf->commande->enabled), ); // Picto $picto = array( -'USER' => 'user', -'SOCIETE' => 'company', +'SOCIETE' => 'generic', 'PRODUCTDESC' => 'product', -'MEMBER' => 'user', 'MAILING' => 'email', 'DETAILS' => 'generic', ); diff --git a/htdocs/categories/fiche.php b/htdocs/categories/fiche.php index c59567527bc..651132de78e 100644 --- a/htdocs/categories/fiche.php +++ b/htdocs/categories/fiche.php @@ -210,7 +210,7 @@ if ($user->rights->categorie->creer) // Description print ''.$langs->trans("Description").''; require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); - $doleditor=new DolEditor('description',$object->description,'',200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,ROWS_6,50); + $doleditor=new DolEditor('description',$object->description,'',200,'dolibarr_notes','',false,true,$conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,ROWS_6,50); $doleditor->Create(); print ''; diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php index 6fbade0ac8c..6628b385e9a 100644 --- a/htdocs/comm/mailing/fiche.php +++ b/htdocs/comm/mailing/fiche.php @@ -634,7 +634,7 @@ if ($_GET["action"] == 'create') print ''; // Editeur wysiwyg require_once(DOL_DOCUMENT_ROOT."/core/class/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->global->FCKEDITOR_ENABLE_MAILING,20,70); $doleditor->Create(); print ''; print ''; @@ -1046,7 +1046,7 @@ else print ''; // Editeur wysiwyg require_once(DOL_DOCUMENT_ROOT."/core/class/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->global->FCKEDITOR_ENABLE_MAILING,20,70); $doleditor->Create(); print ''; diff --git a/htdocs/compta/bank/fiche.php b/htdocs/compta/bank/fiche.php index 888f9c584b0..c7f9af67970 100644 --- a/htdocs/compta/bank/fiche.php +++ b/htdocs/compta/bank/fiche.php @@ -302,7 +302,7 @@ if ($action == 'create') print ''; // Editor wysiwyg require_once(DOL_DOCUMENT_ROOT."/core/class/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->global->FCKEDITOR_ENABLE_SOCIETE,10,70); $doleditor->Create(); print ''; @@ -324,9 +324,9 @@ if ($action == 'create') print 'account_min_desired).'">'; print ''; - + print '

'; - + print ''; } /* ************************************************************************** */ @@ -590,7 +590,7 @@ else print ''; // Editor wysiwyg require_once(DOL_DOCUMENT_ROOT."/core/class/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->global->FCKEDITOR_ENABLE_SOCIETE,10,70); $doleditor->Create(); print ''; diff --git a/htdocs/core/modules/modFckeditor.class.php b/htdocs/core/modules/modFckeditor.class.php index 24a07aabaab..657822fdaec 100644 --- a/htdocs/core/modules/modFckeditor.class.php +++ b/htdocs/core/modules/modFckeditor.class.php @@ -68,11 +68,9 @@ class modFckeditor extends DolibarrModules // Constantes $this->const = array(); - $this->const[0] = array("FCKEDITOR_ENABLE_USER","yesno","1","Activation fckeditor sur notes utilisateurs"); - $this->const[1] = array("FCKEDITOR_ENABLE_SOCIETE","yesno","1","Activation fckeditor sur notes societe"); - $this->const[2] = array("FCKEDITOR_ENABLE_PRODUCTDESC","yesno","1","Activation fckeditor sur notes produits"); - $this->const[3] = array("FCKEDITOR_ENABLE_MEMBER","yesno","1","Activation fckeditor sur notes adherent"); - $this->const[4] = array("FCKEDITOR_ENABLE_MAILING","yesno","1","Activation fckeditor sur emailing"); + $this->const[0] = array("FCKEDITOR_ENABLE_SOCIETE","yesno","1","Activation fckeditor sur notes autres"); + $this->const[1] = array("FCKEDITOR_ENABLE_PRODUCTDESC","yesno","1","Activation fckeditor sur notes produits"); + $this->const[2] = array("FCKEDITOR_ENABLE_MAILING","yesno","1","Activation fckeditor sur emailing"); // Boites $this->boxes = array(); diff --git a/htdocs/core/tpl/freeproductline_create.tpl.php b/htdocs/core/tpl/freeproductline_create.tpl.php index 92b2d03868c..88a58b73ff7 100644 --- a/htdocs/core/tpl/freeproductline_create.tpl.php +++ b/htdocs/core/tpl/freeproductline_create.tpl.php @@ -56,7 +56,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/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->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 666d9945ccf..d0105076068 100644 --- a/htdocs/core/tpl/freeproductline_edit.tpl.php +++ b/htdocs/core/tpl/freeproductline_edit.tpl.php @@ -48,7 +48,7 @@ $nbrows=ROWS_2; if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; require_once(DOL_DOCUMENT_ROOT."/core/class/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->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 cbef00b611d..fe12db9716f 100644 --- a/htdocs/core/tpl/predefinedproductline_create.tpl.php +++ b/htdocs/core/tpl/predefinedproductline_create.tpl.php @@ -63,7 +63,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/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->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 f80c927aba9..6eb06b6ddd9 100644 --- a/htdocs/core/tpl/predefinedproductline_edit.tpl.php +++ b/htdocs/core/tpl/predefinedproductline_edit.tpl.php @@ -53,12 +53,12 @@ $parameters=array('fk_parent_line'=>$fk_parent_line); echo $hookmanager->executeHooks('formEditProductOptions',$parameters,$this,$action); } - + // editeur wysiwyg $nbrows=ROWS_2; if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; require_once(DOL_DOCUMENT_ROOT."/core/class/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->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); $doleditor->Create(); ?> @@ -77,9 +77,9 @@ info_bits & 2) != 2) { ?> - % + % -   +   diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index c0a97637996..7f65a2e840d 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -975,7 +975,7 @@ else if ($id > 0 || ! empty($ref)) // Editeur wysiwyg require_once(DOL_DOCUMENT_ROOT."/core/class/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->global->FCKEDITOR_ENABLE_DETAILS,ROWS_2,70); $doleditor->Create(); print ''; @@ -1030,7 +1030,7 @@ else if ($id > 0 || ! empty($ref)) print ''; // editeur wysiwyg require_once(DOL_DOCUMENT_ROOT."/core/class/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->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 10bb193c476..a535f62b1f2 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -1168,7 +1168,7 @@ if ($id > 0 || ! empty($ref)) require_once(DOL_DOCUMENT_ROOT."/core/class/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->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); $doleditor->Create(); print ''; @@ -1221,7 +1221,7 @@ if ($id > 0 || ! empty($ref)) require_once(DOL_DOCUMENT_ROOT."/core/class/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->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); $doleditor->Create(); print ''; @@ -1272,7 +1272,7 @@ if ($id > 0 || ! empty($ref)) require_once(DOL_DOCUMENT_ROOT."/core/class/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->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); $doleditor->Create(); print ''; diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index b62ac3b2ba9..4298fcb8598 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -1463,7 +1463,7 @@ else require_once(DOL_DOCUMENT_ROOT."/core/class/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,'',128,'dolibarr_details','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); + $doleditor=new DolEditor('label',$fac->lines[$i]->description,'',128,'dolibarr_details','',false,true,$conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); $doleditor->Create(); print ''; @@ -1593,7 +1593,7 @@ else require_once(DOL_DOCUMENT_ROOT."/core/class/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->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70); $doleditor->Create(); print ''; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 217f17973a3..caa9541577f 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1168,12 +1168,9 @@ FreeLegalTextOnDeliveryReceipts=Free text on delivery receipts ##### FCKeditor ##### AdvancedEditor=Advanced editor ActivateFCKeditor=Activate advanced editor for: -FCKeditorForUsers=WYSIWIG creation/edition of user's description and note -FCKeditorForCompany=WYSIWIG creation/edition of companie's description and note +FCKeditorForCompany=WYSIWIG creation/edition of element's description and note (except products/services) FCKeditorForProduct=WYSIWIG creation/edition of products/service's description and note -FCKeditorForMembers=WYSIWIG creation/edition of member's description and note FCKeditorForProductDetails=WYSIWIG creation/edition of products details lines for all entities (proposals, orders, invoices, etc...). Warning: Using this option for this case is seriously not recommanded as it can create problems with special characters and page formating when building PDF files. -FCKeditorForProductDetailsPerso=WYSIWIG creation/edition of products personalized details lines for all entities (proposals, orders, invoices, etc...) FCKeditorForMailing=WYSIWIG creation/edition of mailings ##### OSCommerce 1 ##### OSCommerceErrorConnectOkButWrongDatabase=Connection succeeded but database doesn't look to be an OSCommerce database (Key %s not found in table %s). diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 2bad0616e33..424b3782086 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -1176,12 +1176,9 @@ FreeLegalTextOnDeliveryReceipts= Mention complémentaire sur les bons de récept ##### FCKeditor ##### AdvancedEditor=Editeur avancé ActivateFCKeditor= Activer éditeur avancé pour : -FCKeditorForUsers= Création/édition WYSIWIG de la description et note des utilisateurs -FCKeditorForCompany= Création/édition WYSIWIG de la description et note des tiers +FCKeditorForCompany= Création/édition WYSIWIG de la description et note des éléments (autre que produits/services) FCKeditorForProduct= Création/édition WYSIWIG de la description et note des produits/services -FCKeditorForMembers= Création/édition WYSIWIG de la description et note des adhérents FCKeditorForProductDetails= Création/édition WYSIWIG des lignes détails produits (sur commandes, propales, factures, etc...). Attention: L'utilisation pour ce cas est fortement déconseillée car peut poser des problèmes dans la gestion de caractères et mise en page des fichiers PDF générés. -FCKeditorForProductDetailsPerso= Création/édition WYSIWIG des lignes détails produits personnalisées (sur commandes, propales, factures, etc...) FCKeditorForMailing= Création/édition WYSIWIG des mailings ##### OSCommerce 1 ##### OSCommerceErrorConnectOkButWrongDatabase= La connexion a réussi mais la base ne semble pas être une base OSCommerce (clé %s non trouvée dans la table %s). diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 73aef0952e2..6c5f62adc91 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -700,7 +700,7 @@ else print ''.$langs->trans("Description").''; require_once(DOL_DOCUMENT_ROOT."/core/class/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->global->FCKEDITOR_ENABLE_PRODUCTDESC,4,90); $doleditor->Create(); print ""; @@ -762,7 +762,7 @@ else // Note (invisible sur facture, propales...) print ''.$langs->trans("NoteNotVisibleOnBill").''; require_once(DOL_DOCUMENT_ROOT."/core/class/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->global->FCKEDITOR_ENABLE_PRODUCTDESC,8,70); $doleditor->Create(); print ""; @@ -874,7 +874,7 @@ else // Description (used in invoice, propal...) print ''.$langs->trans("Description").''; require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); - $doleditor=new DolEditor('desc',$object->description,'',160,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,4,90); + $doleditor=new DolEditor('desc',$object->description,'',160,'dolibarr_notes','',false,true,$conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,4,90); $doleditor->Create(); print ""; print "\n"; @@ -952,7 +952,7 @@ else // Note print ''.$langs->trans("NoteNotVisibleOnBill").''; require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); - $doleditor=new DolEditor('note',$object->note,'',200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,8,70); + $doleditor=new DolEditor('note',$object->note,'',200,'dolibarr_notes','',false,true,$conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,8,70); $doleditor->Create(); print ""; print ''; diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php index 5987bb93fe0..28b29abaa85 100644 --- a/htdocs/product/traduction.php +++ b/htdocs/product/traduction.php @@ -169,12 +169,12 @@ if ($_GET["action"] == 'edit') print ''.$langs->trans('Label').''; print ''.$langs->trans('Description').''; require_once(DOL_DOCUMENT_ROOT."/core/class/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->global->FCKEDITOR_ENABLE_PRODUCTDESC,3,80); $doleditor->Create(); print ''; print ''.$langs->trans('Note').''; require_once(DOL_DOCUMENT_ROOT."/core/class/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->global->FCKEDITOR_ENABLE_PRODUCTDESC,3,80); $doleditor->Create(); print ''; print ''; @@ -245,12 +245,12 @@ if ($_GET["action"] == 'add' && ($user->rights->produit->creer || $user->rights- print ''.$langs->trans('Label').''; print ''.$langs->trans('Description').''; require_once(DOL_DOCUMENT_ROOT."/core/class/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->global->FCKEDITOR_ENABLE_PRODUCTDESC,3,80); $doleditor->Create(); print ''; print ''.$langs->trans('Note').''; require_once(DOL_DOCUMENT_ROOT."/core/class/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->global->FCKEDITOR_ENABLE_PRODUCTDESC,3,80); $doleditor->Create(); print ''; print ''; diff --git a/htdocs/societe/socnote.php b/htdocs/societe/socnote.php index 80cefe84987..6bd3b3e01e0 100644 --- a/htdocs/societe/socnote.php +++ b/htdocs/societe/socnote.php @@ -120,7 +120,7 @@ if ($socid > 0) // Editeur wysiwyg require_once(DOL_DOCUMENT_ROOT."/core/class/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->global->FCKEDITOR_ENABLE_SOCIETE,20,70); $doleditor->Create(); } else @@ -129,17 +129,17 @@ if ($socid > 0) } print ""; + print ""; + if ($action == 'edit') { - print ''; + print '

'; print ''; print '   '; print ''; - print ''; + print '
'; } - print ""; - print ''; } diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index bd96e434818..a47524ca776 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -829,18 +829,9 @@ if (($action == 'create') || ($action == 'adduserldap')) print ''; print $langs->trans("Note"); print ''; - if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_USER) - { - require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); - $doleditor=new DolEditor('note','','',180,'dolibarr_notes','',false); - $doleditor->Create(); - } - else - { - print ''; - } + require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); + $doleditor=new DolEditor('note','','',180,'dolibarr_notes','',false,true,$conf->global->FCKEDITOR_ENABLE_SOCIETE,ROWS_4,90); + $doleditor->Create(); print "\n"; // Autres caracteristiques issus des autres modules diff --git a/htdocs/user/group/fiche.php b/htdocs/user/group/fiche.php index dbf4e55d1f9..f670ce144a9 100644 --- a/htdocs/user/group/fiche.php +++ b/htdocs/user/group/fiche.php @@ -245,18 +245,10 @@ if ($action == 'create') } print "".''.$langs->trans("Note").''; - if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_USER) - { - require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); - $doleditor=new DolEditor('note','','',240,'dolibarr_notes','',false); - $doleditor->Create(); - } - else - { - print ''; - } - print "\n"; + require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); + $doleditor=new DolEditor('note','','',240,'dolibarr_notes','',false,true,$conf->global->FCKEDITOR_ENABLE_SOCIETE,ROWS_8,90); + $doleditor->Create(); + print "\n"; print "\n"; print '

'; @@ -353,7 +345,7 @@ else print "
\n"; - dol_htmloutput_errors($message); + dol_htmloutput_mesg($message); /* * Liste des utilisateurs dans le groupe @@ -501,23 +493,15 @@ else print ''.$langs->trans("Note").''; print ''; - - if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_USER) - { - require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); - $doleditor=new DolEditor('note',$object->note,'',240,'dolibarr_notes','',true); - $doleditor->Create(); - } - else - { - print ''; - } + require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); + $doleditor=new DolEditor('note',$object->note,'',240,'dolibarr_notes','',true,false,$conf->global->FCKEDITOR_ENABLE_SOCIETE,ROWS_8,90); + $doleditor->Create(); print ''; print "\n"; - print ''; print "\n"; + + print '

'; + print ''; print ''; @@ -526,7 +510,7 @@ else } } -$db->close(); - llxFooter(); + +if (is_object($db)) $db->close(); ?> diff --git a/htdocs/user/note.php b/htdocs/user/note.php index e86f007abb0..3bbacca3bb3 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -123,25 +123,26 @@ if ($id) print "id."\">"; // Editeur wysiwyg require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); - $doleditor=new DolEditor('note',$fuser->note,'',280,'dolibarr_notes','In',true,false,$conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_USER,10,80); + $doleditor=new DolEditor('note',$fuser->note,'',280,'dolibarr_notes','In',true,false,$conf->global->FCKEDITOR_ENABLE_SOCIETE,10,80); $doleditor->Create(); } else { - print dol_textishtml($fuser->note)?$fuser->note:dol_nl2br($fuser->note,1,true); + print dol_htmlentitiesbr($fuser->note); } print ""; + print ""; + if ($action == 'edit') { - print ''; + print '

'; print ''; print '   '; print ''; - print ''; + print '
'; } - print ""; print "\n";