diff --git a/htdocs/admin/fckeditor.php b/htdocs/admin/fckeditor.php
index 98c78196204..497bed1c02a 100644
--- a/htdocs/admin/fckeditor.php
+++ b/htdocs/admin/fckeditor.php
@@ -86,7 +86,9 @@ foreach($modules as $const => $desc)
if (GETPOST('save','alpha'))
{
- dolibarr_set_const($db, "FCKEDITOR_TEST", GETPOST('formtestfield','alpha'),'chaine',0,'',$conf->entity);
+ $res=dolibarr_set_const($db, "FCKEDITOR_TEST", GETPOST('formtestfield'),'chaine',0,'',$conf->entity);
+
+ if ($res > 0) $mesg=$langs->trans("RecordModifiedSuccessfully");
}
@@ -103,56 +105,64 @@ print '
';
$var=true;
-print '
';
-print '';
-print '| '.$langs->trans("ActivateFCKeditor").' | ';
-print ''.$langs->trans("Action").' | ';
-print "
\n";
-
-// Modules
-foreach($modules as $const => $desc)
+if (empty($conf->use_javascript_ajax))
{
- // Si condition non remplie, on ne propose pas l'option
- if (! $conditions[$const]) continue;
-
- $var=!$var;
- print "";
- print '| '.img_object("",$picto[$const]).' | ';
- print ''.$langs->trans($desc).' | ';
- print '';
- $constante = 'FCKEDITOR_ENABLE_'.$const;
- $value = $conf->global->$constante;
- if($value == 0)
- {
- print ''.img_picto($langs->trans("Disabled"),'switch_off').'';
- }
- else if($value == 1)
- {
- print ''.img_picto($langs->trans("Enabled"),'switch_on').'';
- }
-
- print " | ";
- print '
';
+ dol_htmloutput_errors('',array($langs->trans("NotAvailable"),$langs->trans("JavascriptDisabled")),1);
}
+else
+{
+ print '';
+ print '';
+ print '| '.$langs->trans("ActivateFCKeditor").' | ';
+ print ''.$langs->trans("Action").' | ';
+ print "
\n";
-print '
'."\n";
+ // Modules
+ 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]).' | ';
+ print ''.$langs->trans($desc).' | ';
+ print '';
+ $constante = 'FCKEDITOR_ENABLE_'.$const;
+ $value = $conf->global->$constante;
+ if($value == 0)
+ {
+ print ''.img_picto($langs->trans("Disabled"),'switch_off').'';
+ }
+ else if($value == 1)
+ {
+ print ''.img_picto($langs->trans("Enabled"),'switch_on').'';
+ }
-print ' '."\n";
-print_fiche_titre($langs->trans("TestSubmitForm"),'','');
-print ''."\n";
+ print " | ";
+ print '
';
+ }
-/*
- print '';
- print $_POST["formtestfield"];
- print '';
- print $conf->global->FCKEDITOR_TEST;
- */
+ print '
'."\n";
+
+ dol_htmloutput_mesg($mesg);
+
+ print '
'."\n";
+ print_fiche_titre($langs->trans("TestSubmitForm"),'','');
+ print ''."\n";
+
+ /*
+ print '';
+ print $_POST["formtestfield"];
+ print '';
+ print $conf->global->FCKEDITOR_TEST;
+ */
+}
$db->close();