diff --git a/ChangeLog b/ChangeLog index 2ae90ae8d76..18496304b2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -40,6 +40,7 @@ For users: - New: Reorganize tabs on third parties. - New: Option MAIN_INVERT_SENDER_RECIPIENT is available in einstein pdf template. - New: Easier way to define url for clicktodial module. +- New: Add a fckeditor test area in fckeditor module setup. - Perf: Avoid reading database to determine country code after each page call. - Fix: Better Postgresql compatibility. diff --git a/htdocs/admin/fckeditor.php b/htdocs/admin/fckeditor.php index b92c9007bd5..d68d76f383b 100644 --- a/htdocs/admin/fckeditor.php +++ b/htdocs/admin/fckeditor.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005-2007 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -28,6 +28,7 @@ require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php"); +require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); $langs->load("admin"); $langs->load("fckeditor"); @@ -64,6 +65,12 @@ $picto = array( ); + +/* + * Actions + */ + + foreach($modules as $const => $desc) { if ($_GET["action"] == 'activate_'.strtolower($const)) @@ -85,9 +92,15 @@ foreach($modules as $const => $desc) } } +if ($_POST["save"]) +{ + dolibarr_set_const($db, "FCKEDITOR_TEST", $_POST["formtestfield"],'chaine',0,'',$conf->entity); +} + + /* - * Affiche page + * View */ llxHeader(); @@ -113,7 +126,7 @@ foreach($modules as $const => $desc) { // Si condition non remplie, on ne propose pas l'option if (! $conditions[$const]) continue; - + $var=!$var; print ""; print ''.img_object("",$picto[$const]).''; @@ -143,6 +156,13 @@ foreach($modules as $const => $desc) print ''; +print '
'; +print_fiche_titre($langs->trans("Test"),'',''); +print '
'."\n"; +$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"; $db->close();