Qual: Reduce sub-options of module fckeditor. This make code cleaner

and all this duplicated options were useless.
This commit is contained in:
Laurent Destailleur 2011-11-05 23:18:49 +01:00
parent 5de1db527c
commit 40da2e23d2
21 changed files with 65 additions and 103 deletions

View File

@ -137,7 +137,7 @@ if ($id)
print "<input type=\"hidden\" name=\"action\" value=\"update\">"; print "<input type=\"hidden\" name=\"action\" value=\"update\">";
print "<input type=\"hidden\" name=\"id\" value=\"".$adh->id."\">"; print "<input type=\"hidden\" name=\"id\" value=\"".$adh->id."\">";
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); 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(); $doleditor->Create();
} }
else else

View File

@ -34,28 +34,22 @@ if (!$user->admin) accessforbidden();
// Constante et traduction de la description du module // Constante et traduction de la description du module
$modules = array( $modules = array(
'USER' => 'FCKeditorForUsers', 'SOCIETE' => 'FCKeditorForCompany',
'SOCIETE' => 'FCKeditorForCompany', // TODO Regrouper les 4 parm sur edit notes en 1 seul
'PRODUCTDESC' => 'FCKeditorForProduct', 'PRODUCTDESC' => 'FCKeditorForProduct',
'MEMBER' => 'FCKeditorForMembers',
'MAILING' => 'FCKeditorForMailing', 'MAILING' => 'FCKeditorForMailing',
'DETAILS' => 'FCKeditorForProductDetails', 'DETAILS' => 'FCKeditorForProductDetails',
); );
// Conditions pour que l'option soit proposee // Conditions pour que l'option soit proposee
$conditions = array( $conditions = array(
'USER' => 1, 'SOCIETE' => 1,
'SOCIETE' => $conf->societe->enabled,
'PRODUCTDESC' => ($conf->product->enabled||$conf->service->enabled), 'PRODUCTDESC' => ($conf->product->enabled||$conf->service->enabled),
'MEMBER' => $conf->adherent->enabled,
'MAILING' => $conf->mailing->enabled, 'MAILING' => $conf->mailing->enabled,
'DETAILS' => ($conf->facture->enabled||$conf->propal->enabled||$conf->commande->enabled), 'DETAILS' => ($conf->facture->enabled||$conf->propal->enabled||$conf->commande->enabled),
); );
// Picto // Picto
$picto = array( $picto = array(
'USER' => 'user', 'SOCIETE' => 'generic',
'SOCIETE' => 'company',
'PRODUCTDESC' => 'product', 'PRODUCTDESC' => 'product',
'MEMBER' => 'user',
'MAILING' => 'email', 'MAILING' => 'email',
'DETAILS' => 'generic', 'DETAILS' => 'generic',
); );

View File

@ -210,7 +210,7 @@ if ($user->rights->categorie->creer)
// Description // Description
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>'; print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); 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(); $doleditor->Create();
print '</td></tr>'; print '</td></tr>';

View File

@ -634,7 +634,7 @@ if ($_GET["action"] == 'create')
print '<td>'; print '<td>';
// Editeur wysiwyg // Editeur wysiwyg
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); 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(); $doleditor->Create();
print '</td></tr>'; print '</td></tr>';
print '</table>'; print '</table>';
@ -1046,7 +1046,7 @@ else
print '<td colspan="3">'; print '<td colspan="3">';
// Editeur wysiwyg // Editeur wysiwyg
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); 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(); $doleditor->Create();
print '</td></tr>'; print '</td></tr>';

View File

@ -302,7 +302,7 @@ if ($action == 'create')
print '<td colspan="3">'; print '<td colspan="3">';
// Editor wysiwyg // Editor wysiwyg
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); 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(); $doleditor->Create();
print '</td></tr>'; print '</td></tr>';
@ -324,9 +324,9 @@ if ($action == 'create')
print '<td colspan="3"><input size="12" type="text" class="flat" name="account_min_desired" value="'.($_POST["account_min_desired"]?$_POST["account_min_desired"]:$account->account_min_desired).'"></td></tr>'; print '<td colspan="3"><input size="12" type="text" class="flat" name="account_min_desired" value="'.($_POST["account_min_desired"]?$_POST["account_min_desired"]:$account->account_min_desired).'"></td></tr>';
print '</table>'; print '</table>';
print '<center><br><input value="'.$langs->trans("CreateAccount").'" type="submit" class="button"></center>'; print '<center><br><input value="'.$langs->trans("CreateAccount").'" type="submit" class="button"></center>';
print '</form>'; print '</form>';
} }
/* ************************************************************************** */ /* ************************************************************************** */
@ -590,7 +590,7 @@ else
print '<td colspan="3">'; print '<td colspan="3">';
// Editor wysiwyg // Editor wysiwyg
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); 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(); $doleditor->Create();
print '</td></tr>'; print '</td></tr>';

View File

@ -68,11 +68,9 @@ class modFckeditor extends DolibarrModules
// Constantes // Constantes
$this->const = array(); $this->const = array();
$this->const[0] = array("FCKEDITOR_ENABLE_USER","yesno","1","Activation fckeditor sur notes utilisateurs"); $this->const[0] = array("FCKEDITOR_ENABLE_SOCIETE","yesno","1","Activation fckeditor sur notes autres");
$this->const[1] = array("FCKEDITOR_ENABLE_SOCIETE","yesno","1","Activation fckeditor sur notes societe"); $this->const[1] = array("FCKEDITOR_ENABLE_PRODUCTDESC","yesno","1","Activation fckeditor sur notes produits");
$this->const[2] = array("FCKEDITOR_ENABLE_PRODUCTDESC","yesno","1","Activation fckeditor sur notes produits"); $this->const[2] = array("FCKEDITOR_ENABLE_MAILING","yesno","1","Activation fckeditor sur emailing");
$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");
// Boites // Boites
$this->boxes = array(); $this->boxes = array();

View File

@ -56,7 +56,7 @@
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
$nbrows=ROWS_2; $nbrows=ROWS_2;
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; 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(); $doleditor->Create();
?> ?>
</td> </td>

View File

@ -48,7 +48,7 @@
$nbrows=ROWS_2; $nbrows=ROWS_2;
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; 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"); 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(); $doleditor->Create();
?> ?>
</td> </td>

View File

@ -63,7 +63,7 @@
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
$nbrows=ROWS_2; $nbrows=ROWS_2;
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; 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(); $doleditor->Create();
?> ?>
</td> </td>

View File

@ -53,12 +53,12 @@
$parameters=array('fk_parent_line'=>$fk_parent_line); $parameters=array('fk_parent_line'=>$fk_parent_line);
echo $hookmanager->executeHooks('formEditProductOptions',$parameters,$this,$action); echo $hookmanager->executeHooks('formEditProductOptions',$parameters,$this,$action);
} }
// editeur wysiwyg // editeur wysiwyg
$nbrows=ROWS_2; $nbrows=ROWS_2;
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; 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"); 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(); $doleditor->Create();
?> ?>
</td> </td>
@ -77,9 +77,9 @@
<td align="right" nowrap> <td align="right" nowrap>
<?php if (($line->info_bits & 2) != 2) { ?> <?php if (($line->info_bits & 2) != 2) { ?>
<input size="1" type="text" class="flat" name="remise_percent" value="<?php echo $line->remise_percent; ?>" />% <input size="1" type="text" class="flat" name="remise_percent" value="<?php echo $line->remise_percent; ?>" />%
<?php } else { ?> <?php } else { ?>
&nbsp; &nbsp;
<?php } ?> <?php } ?>
</td> </td>

View File

@ -975,7 +975,7 @@ else if ($id > 0 || ! empty($ref))
// Editeur wysiwyg // Editeur wysiwyg
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); 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(); $doleditor->Create();
print '</td>'; print '</td>';
@ -1030,7 +1030,7 @@ else if ($id > 0 || ! empty($ref))
print '<td>'; print '<td>';
// editeur wysiwyg // editeur wysiwyg
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); 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(); $doleditor->Create();
print '</td>'; print '</td>';

View File

@ -1168,7 +1168,7 @@ if ($id > 0 || ! empty($ref))
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
$nbrows=ROWS_2; $nbrows=ROWS_2;
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; 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(); $doleditor->Create();
print '</td>'; print '</td>';
@ -1221,7 +1221,7 @@ if ($id > 0 || ! empty($ref))
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
$nbrows=ROWS_2; $nbrows=ROWS_2;
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; 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(); $doleditor->Create();
print '</td>'; print '</td>';
@ -1272,7 +1272,7 @@ if ($id > 0 || ! empty($ref))
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
$nbrows=ROWS_2; $nbrows=ROWS_2;
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; 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(); $doleditor->Create();
print '</td>'; print '</td>';

View File

@ -1463,7 +1463,7 @@ else
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
$nbrows=ROWS_2; $nbrows=ROWS_2;
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; 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(); $doleditor->Create();
print '</td>'; print '</td>';
@ -1593,7 +1593,7 @@ else
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
$nbrows=ROWS_2; $nbrows=ROWS_2;
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT; 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(); $doleditor->Create();
print '</td>'; print '</td>';

View File

@ -1168,12 +1168,9 @@ FreeLegalTextOnDeliveryReceipts=Free text on delivery receipts
##### FCKeditor ##### ##### FCKeditor #####
AdvancedEditor=Advanced editor AdvancedEditor=Advanced editor
ActivateFCKeditor=Activate advanced editor for: ActivateFCKeditor=Activate advanced editor for:
FCKeditorForUsers=WYSIWIG creation/edition of user's description and note FCKeditorForCompany=WYSIWIG creation/edition of element's description and note (except products/services)
FCKeditorForCompany=WYSIWIG creation/edition of companie's description and note
FCKeditorForProduct=WYSIWIG creation/edition of products/service's description and note 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...). <font class="warning">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.</font> FCKeditorForProductDetails=WYSIWIG creation/edition of products details lines for all entities (proposals, orders, invoices, etc...). <font class="warning">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.</font>
FCKeditorForProductDetailsPerso=WYSIWIG creation/edition of products personalized details lines for all entities (proposals, orders, invoices, etc...)
FCKeditorForMailing=WYSIWIG creation/edition of mailings FCKeditorForMailing=WYSIWIG creation/edition of mailings
##### OSCommerce 1 ##### ##### OSCommerce 1 #####
OSCommerceErrorConnectOkButWrongDatabase=Connection succeeded but database doesn't look to be an OSCommerce database (Key %s not found in table %s). OSCommerceErrorConnectOkButWrongDatabase=Connection succeeded but database doesn't look to be an OSCommerce database (Key %s not found in table %s).

View File

@ -1176,12 +1176,9 @@ FreeLegalTextOnDeliveryReceipts= Mention complémentaire sur les bons de récept
##### FCKeditor ##### ##### FCKeditor #####
AdvancedEditor=Editeur avancé AdvancedEditor=Editeur avancé
ActivateFCKeditor= Activer éditeur avancé pour : 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 éléments (autre que produits/services)
FCKeditorForCompany= Création/édition WYSIWIG de la description et note des tiers
FCKeditorForProduct= Création/édition WYSIWIG de la description et note des 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...). <font class="warning">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.</font> FCKeditorForProductDetails= Création/édition WYSIWIG des lignes détails produits (sur commandes, propales, factures, etc...). <font class="warning">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.</font>
FCKeditorForProductDetailsPerso= Création/édition WYSIWIG des lignes détails produits personnalisées (sur commandes, propales, factures, etc...)
FCKeditorForMailing= Création/édition WYSIWIG des mailings FCKeditorForMailing= Création/édition WYSIWIG des mailings
##### OSCommerce 1 ##### ##### 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). 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).

View File

@ -700,7 +700,7 @@ else
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>'; print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); 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(); $doleditor->Create();
print "</td></tr>"; print "</td></tr>";
@ -762,7 +762,7 @@ else
// Note (invisible sur facture, propales...) // Note (invisible sur facture, propales...)
print '<tr><td valign="top">'.$langs->trans("NoteNotVisibleOnBill").'</td><td>'; print '<tr><td valign="top">'.$langs->trans("NoteNotVisibleOnBill").'</td><td>';
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); 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(); $doleditor->Create();
print "</td></tr>"; print "</td></tr>";
@ -874,7 +874,7 @@ else
// Description (used in invoice, propal...) // Description (used in invoice, propal...)
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td colspan="2">'; print '<tr><td valign="top">'.$langs->trans("Description").'</td><td colspan="2">';
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); 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(); $doleditor->Create();
print "</td></tr>"; print "</td></tr>";
print "\n"; print "\n";
@ -952,7 +952,7 @@ else
// Note // Note
print '<tr><td valign="top">'.$langs->trans("NoteNotVisibleOnBill").'</td><td colspan="2">'; print '<tr><td valign="top">'.$langs->trans("NoteNotVisibleOnBill").'</td><td colspan="2">';
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); 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(); $doleditor->Create();
print "</td></tr>"; print "</td></tr>";
print '</table>'; print '</table>';

View File

@ -169,12 +169,12 @@ if ($_GET["action"] == 'edit')
print '<tr><td valign="top" width="15%" class="fieldrequired">'.$langs->trans('Label').'</td><td><input name="libelle-'.$key.'" size="40" value="'.$product->multilangs[$key]["libelle"].'"></td></tr>'; print '<tr><td valign="top" width="15%" class="fieldrequired">'.$langs->trans('Label').'</td><td><input name="libelle-'.$key.'" size="40" value="'.$product->multilangs[$key]["libelle"].'"></td></tr>';
print '<tr><td valign="top" width="15%">'.$langs->trans('Description').'</td><td>'; print '<tr><td valign="top" width="15%">'.$langs->trans('Description').'</td><td>';
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); 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(); $doleditor->Create();
print '</td></tr>'; print '</td></tr>';
print '<tr><td valign="top" width="15%">'.$langs->trans('Note').'</td><td>'; print '<tr><td valign="top" width="15%">'.$langs->trans('Note').'</td><td>';
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); 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(); $doleditor->Create();
print '</td></tr>'; print '</td></tr>';
print '</tr>'; print '</tr>';
@ -245,12 +245,12 @@ if ($_GET["action"] == 'add' && ($user->rights->produit->creer || $user->rights-
print '<tr><td valign="top" width="15%" class="fieldrequired">'.$langs->trans('Label').'</td><td><input name="libelle" size="40"></td></tr>'; print '<tr><td valign="top" width="15%" class="fieldrequired">'.$langs->trans('Label').'</td><td><input name="libelle" size="40"></td></tr>';
print '<tr><td valign="top" width="15%">'.$langs->trans('Description').'</td><td>'; print '<tr><td valign="top" width="15%">'.$langs->trans('Description').'</td><td>';
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); 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(); $doleditor->Create();
print '</td></tr>'; print '</td></tr>';
print '<tr><td valign="top" width="15%">'.$langs->trans('Note').'</td><td>'; print '<tr><td valign="top" width="15%">'.$langs->trans('Note').'</td><td>';
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); 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(); $doleditor->Create();
print '</td></tr>'; print '</td></tr>';
print '</tr>'; print '</tr>';

View File

@ -120,7 +120,7 @@ if ($socid > 0)
// Editeur wysiwyg // Editeur wysiwyg
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); 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(); $doleditor->Create();
} }
else else
@ -129,17 +129,17 @@ if ($socid > 0)
} }
print "</td></tr>"; print "</td></tr>";
print "</table>";
if ($action == 'edit') if ($action == 'edit')
{ {
print '<tr><td colspan="2" align="center">'; print '<center><br>';
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">'; print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
print ' &nbsp; '; print ' &nbsp; ';
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">'; print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
print '</td></tr>'; print '</center>';
} }
print "</table>";
print '</form>'; print '</form>';
} }

View File

@ -829,18 +829,9 @@ if (($action == 'create') || ($action == 'adduserldap'))
print '<tr><td valign="top">'; print '<tr><td valign="top">';
print $langs->trans("Note"); print $langs->trans("Note");
print '</td><td>'; print '</td><td>';
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,true,$conf->global->FCKEDITOR_ENABLE_SOCIETE,ROWS_4,90);
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); $doleditor->Create();
$doleditor=new DolEditor('note','','',180,'dolibarr_notes','',false);
$doleditor->Create();
}
else
{
print '<textarea class="flat" name="note" rows="'.ROWS_4.'" cols="90">';
print $_POST["note"];
print '</textarea>';
}
print "</td></tr>\n"; print "</td></tr>\n";
// Autres caracteristiques issus des autres modules // Autres caracteristiques issus des autres modules

View File

@ -245,18 +245,10 @@ if ($action == 'create')
} }
print "<tr>".'<td valign="top">'.$langs->trans("Note").'</td><td>'; print "<tr>".'<td valign="top">'.$langs->trans("Note").'</td><td>';
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,true,$conf->global->FCKEDITOR_ENABLE_SOCIETE,ROWS_8,90);
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); $doleditor->Create();
$doleditor=new DolEditor('note','','',240,'dolibarr_notes','',false); print "</td></tr>\n";
$doleditor->Create();
}
else
{
print '<textarea class="flat" name="note" rows="'.ROWS_8.'" cols="90">';
print '</textarea>';
}
print "</textarea></td></tr>\n";
print "</table>\n"; print "</table>\n";
print '<center><br><input class="button" value="'.$langs->trans("CreateGroup").'" type="submit"></center>'; print '<center><br><input class="button" value="'.$langs->trans("CreateGroup").'" type="submit"></center>';
@ -353,7 +345,7 @@ else
print "<br>\n"; print "<br>\n";
dol_htmloutput_errors($message); dol_htmloutput_mesg($message);
/* /*
* Liste des utilisateurs dans le groupe * Liste des utilisateurs dans le groupe
@ -501,23 +493,15 @@ else
print '<tr><td width="25%" valign="top">'.$langs->trans("Note").'</td>'; print '<tr><td width="25%" valign="top">'.$langs->trans("Note").'</td>';
print '<td class="valeur">'; print '<td class="valeur">';
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_USER) $doleditor=new DolEditor('note',$object->note,'',240,'dolibarr_notes','',true,false,$conf->global->FCKEDITOR_ENABLE_SOCIETE,ROWS_8,90);
{ $doleditor->Create();
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php");
$doleditor=new DolEditor('note',$object->note,'',240,'dolibarr_notes','',true);
$doleditor->Create();
}
else
{
print '<textarea class="flat" name="note" rows="'.ROWS_8.'" cols="90">';
print dol_htmlentitiesbr_decode($object->note);
print '</textarea>';
}
print '</td>'; print '</td>';
print "</tr>\n"; print "</tr>\n";
print '<tr><td align="center" colspan="2"><input class="button" value="'.$langs->trans("Save").'" type="submit"></td></tr>';
print "</table>\n"; print "</table>\n";
print '<center><br><input class="button" value="'.$langs->trans("Save").'" type="submit"></center>';
print '</form>'; print '</form>';
print '</div>'; print '</div>';
@ -526,7 +510,7 @@ else
} }
} }
$db->close();
llxFooter(); llxFooter();
if (is_object($db)) $db->close();
?> ?>

View File

@ -123,25 +123,26 @@ if ($id)
print "<input type=\"hidden\" name=\"id\" value=\"".$fuser->id."\">"; print "<input type=\"hidden\" name=\"id\" value=\"".$fuser->id."\">";
// Editeur wysiwyg // Editeur wysiwyg
require_once(DOL_DOCUMENT_ROOT."/core/class/doleditor.class.php"); 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(); $doleditor->Create();
} }
else else
{ {
print dol_textishtml($fuser->note)?$fuser->note:dol_nl2br($fuser->note,1,true); print dol_htmlentitiesbr($fuser->note);
} }
print "</td></tr>"; print "</td></tr>";
print "</table>";
if ($action == 'edit') if ($action == 'edit')
{ {
print '<tr><td colspan="4" align="center">'; print '<center><br>';
print '<input type="submit" class="button" name="update" value="'.$langs->trans("Save").'">'; print '<input type="submit" class="button" name="update" value="'.$langs->trans("Save").'">';
print '&nbsp; &nbsp;'; print '&nbsp; &nbsp;';
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">'; print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
print '</td></tr>'; print '</center>';
} }
print "</table>";
print "</form>\n"; print "</form>\n";