Merge pull request #12030 from altatof/fckticket

NEW : FCKeditor setup for tickets
This commit is contained in:
Laurent Destailleur 2019-10-03 17:49:59 +02:00 committed by GitHub
commit 74d3850ec8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 7 deletions

View File

@ -1,7 +1,8 @@
<?php
/* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2012-20113 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2019 Christophe Battarel <christophe@altairis.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -49,7 +50,8 @@ $modules = array(
'DETAILS' => 'FCKeditorForProductDetails',
'USERSIGN' => 'FCKeditorForUserSignature',
'MAILING' => 'FCKeditorForMailing',
'MAIL' => 'FCKeditorForMail'
'MAIL' => 'FCKeditorForMail',
'TICKET' => 'FCKeditorForTicket'
);
// Conditions pour que l'option soit proposee
$conditions = array(
@ -58,7 +60,8 @@ $conditions = array(
'DETAILS' => (! empty($conf->facture->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->commande->enabled) || ! empty($conf->supplier_proposal->enabled) || ! empty($conf->fournisseur->enabled)),
'USERSIGN' => 1,
'MAILING' => ! empty($conf->mailing->enabled),
'MAIL' => (! empty($conf->facture->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->commande->enabled))
'MAIL' => (! empty($conf->facture->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->commande->enabled)),
'TICKET' => ! empty($conf->ticket->enabled)
);
// Picto
$picto = array(
@ -67,7 +70,8 @@ $picto = array(
'DETAILS' => 'product',
'USERSIGN' => 'user',
'MAILING' => 'email',
'MAIL' => 'email'
'MAIL' => 'email',
'TICKET' => 'ticket'
);

View File

@ -242,7 +242,7 @@ class FormTicket
}
include_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
$uselocalbrowser = true;
$doleditor = new DolEditor('message', $msg, '100%', 230, $toolbarname, 'In', true, $uselocalbrowser);
$doleditor = new DolEditor('message', $msg, '100%', 230, $toolbarname, 'In', true, $uselocalbrowser, $conf->global->FCKEDITOR_ENABLE_TICKET);
$doleditor->Create();
print '</td></tr>';

View File

@ -1586,6 +1586,7 @@ FCKeditorForProductDetails=WYSIWIG creation/edition of products details lines fo
FCKeditorForMailing= WYSIWIG creation/edition for mass eMailings (Tools->eMailing)
FCKeditorForUserSignature=WYSIWIG creation/edition of user signature
FCKeditorForMail=WYSIWIG creation/edition for all mail (except Tools->eMailing)
FCKeditorForTicket=WYSIWIG creation/edition for tickets
##### Stock #####
StockSetup=Stock module setup
IfYouUsePointOfSaleCheckModule=If you use the Point of Sale module (POS) provided by default or an external module, this setup may be ignored by your POS module. Most POS modules are designed by default to create an invoice immediately and decrease stock irrespective of the options here. So if you need or not to have a stock decrease when registering a sale from your POS, check also your POS module setup.

View File

@ -1586,6 +1586,7 @@ FCKeditorForProductDetails=Création/édition WYSIWIG des lignes détails produi
FCKeditorForMailing= Création/édition WYSIWIG des emailings (Outils->Emailings)
FCKeditorForUserSignature=Création/édition WYSIWIG de la signature des utilisateurs
FCKeditorForMail=Création/édition WYSIWIG tous les emails (sauf Outils->Emailings)
FCKeditorForTicket=Création/édition WYSIWIG pour les tickets
##### Stock #####
StockSetup=Configuration du module Stock / Entrepôt
IfYouUsePointOfSaleCheckModule=Si vous utilisez un module Point de Vente (module POS fourni par défaut ou un autre module externe), cette configuration peut être ignoré par votre module point de vente. La plupart de modules Point de Vente sont conçus pour créer immédiatement une facture et de réduire les stocks par défaut quelles que soient les options ici. Donc, si vous avez besoin ou non d'avoir une diminution du stock lors de l'enregistrement d'une vente dans votre Point de Vente, vérifiez également la configuration de votre module POS.

View File

@ -177,7 +177,7 @@ class ActionsTicket
*/
public function viewTicketOriginalMessage($user, $action, $object)
{
global $langs;
global $conf, $langs;
print '<!-- initial message of ticket -->'."\n";
if (!empty($user->rights->ticket->manage) && $action == 'edit_message_init') {
@ -208,7 +208,7 @@ class ActionsTicket
$msg = GETPOST('message_initial', 'alpha') ? GETPOST('message_initial', 'alpha') : $object->message;
include_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
$uselocalbrowser = true;
$doleditor = new DolEditor('message_initial', $msg, '100%', 250, 'dolibarr_details', 'In', true, $uselocalbrowser);
$doleditor = new DolEditor('message_initial', $msg, '100%', 250, 'dolibarr_details', 'In', true, $uselocalbrowser, $conf->global->FCKEDITOR_ENABLE_TICKET);
$doleditor->Create();
} else {
// Deal with format differences (text / HTML)