New: Add a fckeditor test area in fckeditor module setup

This commit is contained in:
Laurent Destailleur 2010-11-13 03:21:15 +00:00
parent c7c4a83f58
commit 005fa04aa3
2 changed files with 24 additions and 3 deletions

View File

@ -40,6 +40,7 @@ For users:
- New: Reorganize tabs on third parties. - New: Reorganize tabs on third parties.
- New: Option MAIN_INVERT_SENDER_RECIPIENT is available in einstein pdf template. - New: Option MAIN_INVERT_SENDER_RECIPIENT is available in einstein pdf template.
- New: Easier way to define url for clicktodial module. - 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 - Perf: Avoid reading database to determine country code after each
page call. page call.
- Fix: Better Postgresql compatibility. - Fix: Better Postgresql compatibility.

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -28,6 +28,7 @@
require("../main.inc.php"); require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php"); require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
$langs->load("admin"); $langs->load("admin");
$langs->load("fckeditor"); $langs->load("fckeditor");
@ -64,6 +65,12 @@ $picto = array(
); );
/*
* Actions
*/
foreach($modules as $const => $desc) foreach($modules as $const => $desc)
{ {
if ($_GET["action"] == 'activate_'.strtolower($const)) 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(); llxHeader();
@ -143,6 +156,13 @@ foreach($modules as $const => $desc)
print '</table>'; print '</table>';
print '<br>';
print_fiche_titre($langs->trans("Test"),'','');
print '<form name="formtest" method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
$editor=new DolEditor('formtestfield',isset($conf->global->FCKEDITOR_TEST)?$conf->global->FCKEDITOR_TEST:'Test',200,'dolibarr_notes','In', true);
$editor->Create();
print '<center><input class="button" type="submit" name="save" value="'.$langs->trans("Save").'"></center>'."\n";
print '</form>'."\n";
$db->close(); $db->close();