30require
'../main.inc.php';
31require_once DOL_DOCUMENT_ROOT.
"/core/class/html.formcategory.class.php";
32require_once DOL_DOCUMENT_ROOT.
"/core/lib/admin.lib.php";
33require_once DOL_DOCUMENT_ROOT.
"/core/lib/ticket.lib.php";
34require_once DOL_DOCUMENT_ROOT.
"/ticket/class/ticket.class.php";
37$langs->loadLangs(array(
"admin",
"ticket"));
45$value =
GETPOST(
'value',
'alpha');
46$action =
GETPOST(
'action',
'aZ09');
47$modulepart =
GETPOST(
'modulepart',
'aZ09');
49$label =
GETPOST(
'label',
'alpha');
50$scandir =
GETPOST(
'scan_dir',
'alpha');
60include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
62if ($action ==
'updateMask') {
63 $maskconstticket =
GETPOST(
'maskconstticket',
'aZ09');
64 $maskticket =
GETPOST(
'maskticket',
'alpha');
66 if ($maskconstticket && preg_match(
'/_MASK$/', $maskconstticket)) {
67 $res =
dolibarr_set_const($db, $maskconstticket, $maskticket,
'chaine', 0,
'', $conf->entity);
79} elseif ($action ==
'set') {
82} elseif ($action ==
'del') {
85 if ($conf->global->TICKET_ADDON_PDF ==
"$value") {
89} elseif (preg_match(
'/set_(.*)/', $action, $reg)) {
91 $value = GETPOSTISSET($code) ?
GETPOSTINT($code) : 1;
92 if ($code ==
'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') >= 2) {
93 $param_notification_also_main_addressemail =
GETPOST(
'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS',
'alpha');
94 $res =
dolibarr_set_const($db,
'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', $param_notification_also_main_addressemail,
'chaine', 0,
'', $conf->entity);
104} elseif (preg_match(
'/del_(.*)/', $action, $reg)) {
110} elseif ($action ==
'setdoc') {
112 if (
dolibarr_set_const($db,
"TICKET_ADDON_PDF", $value,
'chaine', 0,
'', $conf->entity)) {
115 $conf->global->TICKET_ADDON_PDF = $value;
123} elseif ($action ==
'setmod') {
128} elseif ($action ==
'setvarworkflow') {
130 if (empty($conf->use_javascript_ajax)) {
131 $param_auto_read =
GETPOST(
'TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND',
'alpha');
132 $res =
dolibarr_set_const($db,
'TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND', $param_auto_read,
'chaine', 0,
'', $conf->entity);
137 $param_auto_assign =
GETPOST(
'TICKET_AUTO_ASSIGN_USER_CREATE',
'alpha');
138 $res =
dolibarr_set_const($db,
'TICKET_AUTO_ASSIGN_USER_CREATE', $param_auto_assign,
'chaine', 0,
'', $conf->entity);
143 $param_auto_notify_close =
GETPOST(
'TICKET_NOTIFY_AT_CLOSING',
'alpha');
144 $res =
dolibarr_set_const($db,
'TICKET_NOTIFY_AT_CLOSING', $param_auto_notify_close,
'chaine', 0,
'', $conf->entity);
150 $param_limit_view =
GETPOST(
'TICKET_LIMIT_VIEW_ASSIGNED_ONLY',
'alpha');
151 $res =
dolibarr_set_const($db,
'TICKET_LIMIT_VIEW_ASSIGNED_ONLY', $param_limit_view,
'chaine', 0,
'', $conf->entity);
156 if (GETPOSTISSET(
'product_category_id')) {
157 $param_ticket_product_category =
GETPOSTINT(
'product_category_id');
158 $res =
dolibarr_set_const($db,
'TICKET_PRODUCT_CATEGORY', $param_ticket_product_category,
'chaine', 0,
'', $conf->entity);
164 $param_delay_first_response =
GETPOSTINT(
'delay_first_response');
165 $res =
dolibarr_set_const($db,
'TICKET_DELAY_BEFORE_FIRST_RESPONSE', $param_delay_first_response,
'chaine', 0,
'', $conf->entity);
170 $param_delay_between_responses =
GETPOSTINT(
'delay_between_responses');
171 $res =
dolibarr_set_const($db,
'TICKET_DELAY_SINCE_LAST_RESPONSE', $param_delay_between_responses,
'chaine', 0,
'', $conf->entity);
175} elseif ($action ==
'setvar') {
176 include_once DOL_DOCUMENT_ROOT.
"/core/lib/files.lib.php";
178 $notification_email =
GETPOST(
'TICKET_NOTIFICATION_EMAIL_FROM',
'alpha');
179 $notification_email_description =
"Sender of ticket replies sent from Dolibarr";
180 if (!empty($notification_email)) {
181 $res =
dolibarr_set_const($db,
'TICKET_NOTIFICATION_EMAIL_FROM', $notification_email,
'chaine', 0, $notification_email_description, $conf->entity);
183 $res =
dolibarr_set_const($db,
'TICKET_NOTIFICATION_EMAIL_FROM', $conf->global->MAIN_MAIL_EMAIL_FROM,
'chaine', 0, $notification_email_description, $conf->entity);
190 $notification_email_to =
GETPOST(
'TICKET_NOTIFICATION_EMAIL_TO',
'alpha');
191 $notification_email_to_description =
"Notified e-mail for ticket replies sent from Dolibarr";
192 if (!empty($notification_email_to)) {
193 $res =
dolibarr_set_const($db,
'TICKET_NOTIFICATION_EMAIL_TO', $notification_email_to,
'chaine', 0, $notification_email_to_description, $conf->entity);
195 $res =
dolibarr_set_const($db,
'TICKET_NOTIFICATION_EMAIL_TO',
'',
'chaine', 0, $notification_email_to_description, $conf->entity);
201 $mail_intro =
GETPOST(
'TICKET_MESSAGE_MAIL_INTRO',
'restricthtml');
202 $mail_intro_description =
"Introduction text of ticket replies sent from Dolibarr";
203 if (!empty($mail_intro)) {
204 $res =
dolibarr_set_const($db,
'TICKET_MESSAGE_MAIL_INTRO', $mail_intro,
'chaine', 0, $mail_intro_description, $conf->entity);
206 $res =
dolibarr_set_const($db,
'TICKET_MESSAGE_MAIL_INTRO',
'',
'chaine', 0, $mail_intro_description, $conf->entity);
212 $mail_signature =
GETPOST(
'TICKET_MESSAGE_MAIL_SIGNATURE',
'restricthtml');
213 $signature_description =
"Signature of ticket replies sent from Dolibarr";
214 if (!empty($mail_signature)) {
215 $res =
dolibarr_set_const($db,
'TICKET_MESSAGE_MAIL_SIGNATURE', $mail_signature,
'chaine', 0, $signature_description, $conf->entity);
217 $res =
dolibarr_set_const($db,
'TICKET_MESSAGE_MAIL_SIGNATURE',
'',
'chaine', 0, $signature_description, $conf->entity);
224 if (
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') >= 2 && empty($conf->use_javascript_ajax)) {
225 $param_notification_also_main_addressemail =
GETPOST(
'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS',
'alpha');
226 $res =
dolibarr_set_const($db,
'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', $param_notification_also_main_addressemail,
'chaine', 0,
'', $conf->entity);
238$dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
243$help_url =
'EN:Module_Ticket|FR:Module_Ticket_FR';
244$page_name =
'TicketSetup';
245llxHeader(
'', $langs->trans($page_name), $help_url,
'', 0, 0,
'',
'',
'',
'mod-admin page-ticket');
248$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
255print
dol_get_fiche_head($head,
'settings', $langs->trans(
"Module56000Name"), -1,
"ticket");
257print
'<span class="opacitymedium">'.$langs->trans(
"TicketSetupDictionaries").
'</span> : <a href="'.DOL_URL_ROOT.
'/admin/dict.php">'.$langs->trans(
"ClickHereToGoTo", $langs->transnoentitiesnoconv(
"DictionarySetup")).
'</a><br>';
268print
'<div class="div-table-responsive-no-min">';
269print
'<table class="noborder centpercent">';
270print
'<tr class="liste_titre">';
271print
'<td width="100">'.$langs->trans(
"Name").
'</td>';
272print
'<td>'.$langs->trans(
"Description").
'</td>';
273print
'<td>'.$langs->trans(
"Example").
'</td>';
274print
'<td align="center" width="60">'.$langs->trans(
"Activated").
'</td>';
275print
'<td align="center" width="40">'.$langs->trans(
"ShortInfo").
'</td>';
280foreach ($dirmodels as $reldir) {
284 $handle = opendir($dir);
285 if (is_resource($handle)) {
286 while (($file = readdir($handle)) !==
false) {
287 if (preg_match(
'/^(mod_.*)\.php$/i', $file, $reg)) {
289 $classname = substr($file, 4);
291 include_once $dir.
'/'.$file.
'.php';
293 $module =
new $file();
294 '@phan-var-force ModeleNumRefTicket $module';
297 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
301 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
305 if ($module->isEnabled()) {
306 print
'<tr class="oddeven"><td>'.$module->name.
"</td><td>\n";
307 print $module->info($langs);
311 print
'<td class="nowrap">';
312 $tmp = $module->getExample();
313 if (preg_match(
'/^Error/', $tmp)) {
314 $langs->load(
"errors");
315 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
316 } elseif ($tmp ==
'NotConfigured') {
317 print
'<span class="opacitymedium">'.$langs->trans($tmp).
'</span>';
324 print
'<td class="center">';
325 if ($conf->global->TICKET_ADDON ==
'mod_'.$classname) {
326 print
img_picto($langs->trans(
"Activated"),
'switch_on');
328 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=setmod&token='.
newToken().
'&value=mod_'.$classname.
'" alt="'.$langs->trans(
"Default").
'">'.
img_picto($langs->trans(
"Disabled"),
'switch_off').
'</a>';
332 $ticket =
new Ticket($db);
333 $ticket->initAsSpecimen();
337 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
338 $nextval = $module->getNextValue($mysoc, $ticket);
339 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
340 $htmltooltip .=
''.$langs->trans(
"NextValue").
': ';
342 $htmltooltip .= $nextval.
'<br>';
344 $htmltooltip .= $langs->trans($module->error).
'<br>';
348 print
'<td class="center">';
349 print $formcategory->textwithpicto(
'', $htmltooltip, 1, 0);
376$sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
377$sql .=
" WHERE type = '".$db->escape($type).
"'";
378$sql .=
" AND entity = ".$conf->entity;
379$resql = $db->query($sql);
382 $num_rows = $db->num_rows($resql);
383 while ($i < $num_rows) {
384 $array = $db->fetch_array($resql);
385 if (is_array($array)) {
386 array_push($def, $array[0]);
395print
'<div class="div-table-responsive-no-min">';
396print
'<table class="noborder cenpercent">'.
"\n";
397print
'<tr class="liste_titre">'.
"\n";
398print
'<td>'.$langs->trans(
"Name").
'</td>';
399print
'<td>'.$langs->trans(
"Description").
'</td>';
400print
'<td class="center" width="60">'.$langs->trans(
"Status").
"</td>\n";
401print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
402print
'<td class="center" width="50">'.$langs->trans(
"Preview").
'</td>';
403print
'<td class="center" width="40">'.$langs->trans(
"ShortInfo").
'</td>';
408foreach ($dirmodels as $reldir) {
409 foreach (array(
'',
'/doc') as $valdir) {
410 $realpath = $reldir.
"core/modules/ticket".$valdir;
414 $handle = opendir($dir);
415 if (is_resource($handle)) {
417 while (($file = readdir($handle)) !==
false) {
423 foreach ($filelist as $file) {
424 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
425 if (file_exists($dir.
'/'.$file)) {
426 $name = substr($file, 4,
dol_strlen($file) - 16);
427 $classname = substr($file, 0,
dol_strlen($file) - 12);
429 require_once $dir.
'/'.$file;
430 $module =
new $classname($db);
431 '@phan-var-force CommonDocGenerator $module';
433 $modulequalified = 1;
434 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
435 $modulequalified = 0;
437 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
438 $modulequalified = 0;
441 if ($modulequalified) {
442 print
'<tr class="oddeven"><td width="100">';
443 print(empty($module->name) ? $name : $module->
name);
445 if (method_exists($module,
'info')) {
446 print $module->info($langs);
448 print $module->description;
453 if (in_array($name, $def)) {
454 print
'<td class="center">'.
"\n";
455 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.
newToken().
'&value='.urlencode($name).
'">';
456 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
460 print
'<td class="center">'.
"\n";
461 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.
newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'">'.
img_picto($langs->trans(
"Disabled"),
'switch_off').
'</a>';
466 print
'<td class="center">';
468 print
img_picto($langs->trans(
"Default"),
'on');
470 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=setdoc&token='.
newToken().
'&value='.$name.
'&scan_dir='.$module->scandir.
'&label='.urlencode($module->name).
'" alt="'.$langs->trans(
"Default").
'">'.
img_picto($langs->trans(
"Disabled"),
'off').
'</a>';
475 print
'<td class="center">';
476 if ($module->type ==
'pdf') {
477 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.urlencode($name).
'">'.
img_object($langs->trans(
"Preview"),
'pdf').
'</a>';
479 print
img_object($langs->trans(
"PreviewNotAvailable"),
'generic');
484 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
485 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
486 if ($module->type ==
'pdf') {
487 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
489 $htmltooltip .=
'<br>'.$langs->trans(
"Path").
': '.preg_replace(
'/^\//',
'', $realpath).
'/'.$file;
491 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
492 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
493 $htmltooltip .=
'<br>'.$langs->trans(
"MultiLanguage").
': '.
yn($module->option_multilang, 1, 1);
499 print
'<td class="center">';
500 print $formcategory->textwithpicto(
'', $htmltooltip, 1, 0);
517print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'" enctype="multipart/form-data" >';
518print
'<input type="hidden" name="token" value="'.newToken().
'">';
519print
'<input type="hidden" name="action" value="setvarworkflow">';
520print
'<input type="hidden" name="page_y" value="">';
527print
'<div class="div-table-responsive-no-min">';
528print
'<table class="noborder centpercent">';
530print
'<tr class="liste_titre">';
531print
'<td>'.$langs->trans(
"Parameter").
'</td>';
532print
'<td>'.$langs->trans(
"Status").
"</td>\n";
533print
'<td class="center" width="40">'.$langs->trans(
"ShortInfo").
'</td>';
537print
'<tr class="oddeven"><td>'.$langs->trans(
"TicketsAutoReadTicket").
'</td>';
538print
'<td class="left">';
539if ($conf->use_javascript_ajax) {
540 print ajax_constantonoff(
'TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND');
542 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
543 print $formcategory->selectarray(
"TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND", $arrval,
getDolGlobalString(
'TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND'));
546print
'<td class="center">';
547print $formcategory->textwithpicto(
'', $langs->trans(
"TicketsAutoReadTicketHelp"), 1,
'help');
552print
'<tr class="oddeven">';
553print
'<td>'.$langs->trans(
"TicketsAutoAssignTicket").
'</td>';
554print
'<td class="left">';
555if ($conf->use_javascript_ajax) {
556 print ajax_constantonoff(
'TICKET_AUTO_ASSIGN_USER_CREATE');
558 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
559 print $formcategory->selectarray(
"TICKET_AUTO_ASSIGN_USER_CREATE", $arrval,
getDolGlobalString(
'TICKET_AUTO_ASSIGN_USER_CREATE'));
562print
'<td class="center">';
563print $formcategory->textwithpicto(
'', $langs->trans(
"TicketsAutoAssignTicketHelp"), 1,
'help');
568print
'<tr class="oddeven"><td>'.$langs->trans(
"TicketsAutoNotifyClose").
'</td>';
569print
'<td class="left">';
570if ($conf->use_javascript_ajax) {
571 print ajax_constantonoff(
'TICKET_NOTIFY_AT_CLOSING');
573 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
574 print $formcategory->selectarray(
"TICKET_NOTIFY_AT_CLOSING", $arrval,
getDolGlobalString(
'TICKET_NOTIFY_AT_CLOSING'));
577print
'<td class="center">';
578print $formcategory->textwithpicto(
'', $langs->trans(
"TicketsAutoNotifyCloseHelp"), 1,
'help');
582if (isModEnabled(
'product')) {
583 $htmlname =
"product_category_id";
584 print
'<tr class="oddeven"><td>'.$langs->trans(
"TicketChooseProductCategory").
'</td>';
585 print
'<td class="left">';
586 print
img_picto(
'',
'category',
'class="pictofixedwidth"');
587 $formcategory->selectProductCategory(
getDolGlobalString(
'TICKET_PRODUCT_CATEGORY'), $htmlname);
588 if ($conf->use_javascript_ajax) {
592 print
'<td class="center">';
593 print $formcategory->textwithpicto(
'', $langs->trans(
"TicketChooseProductCategoryHelp"), 1,
'help');
598print
'<tr class="oddeven">';
599print
'<td>'.$langs->trans(
"TicketsDelayBeforeFirstAnswer").
"</td>";
600print
'<td class="left">
601 <input type="number" value="'.getDolGlobalString(
'TICKET_DELAY_BEFORE_FIRST_RESPONSE').
'" name="delay_first_response" class="width50">
603print
'<td class="center">';
604print $formcategory->textwithpicto(
'', $langs->trans(
"TicketsDelayBeforeFirstAnswerHelp"), 1,
'help');
608print
'<tr class="oddeven">';
609print
'<td>'.$langs->trans(
"TicketsDelayBetweenAnswers").
"</td>";
610print
'<td class="left">
611 <input type="number" value="'.getDolGlobalString(
'TICKET_DELAY_SINCE_LAST_RESPONSE').
'" name="delay_between_responses" class="width50">
613print
'<td class="center">';
614print $formcategory->textwithpicto(
'', $langs->trans(
"TicketsDelayBetweenAnswersHelp"), 1,
'help');
619print
'<tr class="oddeven"><td>'.$langs->trans(
"TicketsAllowClassificationModificationIfClosed").
'</td>';
620print
'<td class="left">';
621if ($conf->use_javascript_ajax) {
622 print ajax_constantonoff(
'TICKET_ALLOW_CLASSIFICATION_MODIFICATION_EVEN_IF_CLOSED');
624 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
625 print $formcategory->selectarray(
"TICKET_ALLOW_CLASSIFICATION_MODIFICATION_EVEN_IF_CLOSED", $arrval,
getDolGlobalString(
'TICKET_ALLOW_CLASSIFICATION_MODIFICATION_EVEN_IF_CLOSED'));
628print
'<td class="center">';
629print $formcategory->textwithpicto(
'', $langs->trans(
"TicketsAllowClassificationModificationIfClosedHelp"), 1,
'help');
635print $formcategory->buttonsSaveCancel(
"Save",
'', array(), 0,
'reposition');
647print
'<table class="noborder centpercent">';
649print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'" enctype="multipart/form-data" >';
650print
'<input type="hidden" name="token" value="'.newToken().
'">';
651print
'<input type="hidden" name="action" value="setvar">';
652print
'<input type="hidden" name="page_y" value="">';
654print
'<tr class="liste_titre">';
655print
'<td colspan="2">'.$langs->trans(
"Email").
'</td>';
656print
'<td class="center" width="40">'.$langs->trans(
"ShortInfo").
'</td>';
661 print
'<td colspan="2"><div class="info">'.$langs->trans(
"TicketCkEditorEmailNotActivated").
'</div></td>';
662 print
'<td class="center" width="40">'.$langs->trans(
"ShortInfo").
'</td>';
669print
'<tr class="oddeven"><td>'.$langs->trans(
"TicketEmailNotificationFrom").
'</td>';
670print
'<td class="left">';
671print
'<input type="text" class="minwidth200" name="TICKET_NOTIFICATION_EMAIL_FROM" value="' .
getDolGlobalString(
'TICKET_NOTIFICATION_EMAIL_FROM').
'"></td>';
672print
'<td class="center">';
673print $formcategory->textwithpicto(
'', $langs->trans(
"TicketEmailNotificationFromHelp"), 1,
'help');
678print
'<tr class="oddeven"><td>'.$langs->trans(
"TicketEmailNotificationTo").
'</td>';
679print
'<td class="left">';
680print
'<input type="text" class="minwidth200" name="TICKET_NOTIFICATION_EMAIL_TO" value="'.(getDolGlobalString(
'TICKET_NOTIFICATION_EMAIL_TO') ? $conf->global->TICKET_NOTIFICATION_EMAIL_TO :
'').
'"></td>';
681print
'<td class="center">';
682print $formcategory->textwithpicto(
'', $langs->trans(
"TicketEmailNotificationToHelp"), 1,
'help');
688 print
'<tr class="oddeven"><td>'.$langs->trans(
"TicketsEmailAlsoSendToMainAddress").
'</td>';
689 print
'<td class="left">';
690 if ($conf->use_javascript_ajax) {
691 print ajax_constantonoff(
'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS');
693 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
694 print $formcategory->selectarray(
"TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS", $arrval, $conf->global->TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS);
697 print
'<td class="center">';
698 print $formcategory->textwithpicto(
'', $langs->trans(
"TicketsEmailAlsoSendToMainAddressHelp"), 1,
'help');
705print
'<tr class="oddeven"><td>'.$langs->trans(
"TicketMessageMailIntro");
707require_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
708$doleditor =
new DolEditor(
'TICKET_MESSAGE_MAIL_INTRO', $mail_intro,
'100%', 90,
'dolibarr_mailings',
'',
false,
true,
getDolGlobalInt(
'FCKEDITOR_ENABLE_MAIL'), ROWS_2, 70);
711print
'<td class="center">';
712print $formcategory->textwithpicto(
'', $langs->trans(
"TicketMessageMailIntroHelpAdmin"), 1,
'help');
717print
'<tr class="oddeven"><td>'.$langs->trans(
"TicketMessageMailFooter").
'</label>';
719require_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
720$doleditor =
new DolEditor(
'TICKET_MESSAGE_MAIL_SIGNATURE', $mail_signature,
'100%', 90,
'dolibarr_mailings',
'',
false,
true,
getDolGlobalInt(
'FCKEDITOR_ENABLE_MAIL'), ROWS_2, 70);
723print
'<td class="center">';
724print $formcategory->textwithpicto(
'', $langs->trans(
"TicketMessageMailFooterHelpAdmin"), 1,
'help');
729print $formcategory->buttonsSaveCancel(
"Save",
'', array(), 0,
'reposition');
addDocumentModel($name, $type, $label='', $description='')
Add document model used by doc generator.
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
delDocumentModel($name, $type)
Delete document model used by doc generator.
ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $forcefocus=0, $widthTypeOfAutocomplete='resolve', $idforemptyvalue='-1', $morecss='')
Convert a html select field into an ajax combobox.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage a WYSIWYG editor.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
Class to generate the form for creating a new ticket.
$conf db name
Only used if Module[ID]Name translation string is not found.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.
ticketAdminPrepareHead()
Build tabs for admin page.