diff --git a/htdocs/admin/fckeditor.php b/htdocs/admin/fckeditor.php
index 7fbe4415b2b..6b608d238f3 100644
--- a/htdocs/admin/fckeditor.php
+++ b/htdocs/admin/fckeditor.php
@@ -25,6 +25,7 @@
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/doleditor.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$langs->load("admin");
@@ -98,13 +99,36 @@ foreach($modules as $const => $desc)
if (GETPOST('save','alpha'))
{
- $res=dolibarr_set_const($db, "FCKEDITOR_TEST", GETPOST('formtestfield'),'chaine',0,'',$conf->entity);
+ $error = 0;
- if ($res > 0) setEventMessage($langs->trans("RecordModifiedSuccessfully"));
+ $fckeditor_skin = GETPOST('fckeditor_skin', 'alpha');
+ if (! empty($fckeditor_skin)) {
+ if (! dolibarr_set_const($db, 'FCKEDITOR_SKIN', $fckeditor_skin, 'chaine', 0, '', $conf->entity)) {
+ $error ++;
+ }
+ } else {
+ $error ++;
+ }
+
+ $fckeditor_test = GETPOST('formtestfield');
+ if (! empty($fckeditor_test)) {
+ if (! dolibarr_set_const($db, 'FCKEDITOR_TEST', $fckeditor_test, 'chaine', 0, '', $conf->entity)) {
+ $error ++;
+ }
+ } else {
+ $error ++;
+ }
+
+ if (! $error)
+ {
+ setEventMessage($langs->trans("SetupSaved"));
+ }
+ else
+ {
+ setEventMessage($langs->trans("Error"),'errors');
+ }
}
-
-
/*
* View
*/
@@ -157,9 +181,15 @@ else
print ''."\n";
+ print '
'."\n";
+
+ print '