31require
'../main.inc.php';
32require_once DOL_DOCUMENT_ROOT.
"/core/class/html.formcategory.class.php";
33require_once DOL_DOCUMENT_ROOT.
"/core/lib/admin.lib.php";
34require_once DOL_DOCUMENT_ROOT.
"/core/lib/ticket.lib.php";
35require_once DOL_DOCUMENT_ROOT.
"/ticket/class/ticket.class.php";
38$langs->loadLangs(array(
"admin",
"ticket"));
46$value =
GETPOST(
'value',
'alpha');
47$action =
GETPOST(
'action',
'aZ09');
48$modulepart =
GETPOST(
'modulepart',
'aZ09');
50$label =
GETPOST(
'label',
'alpha');
51$scandir =
GETPOST(
'scan_dir',
'alpha');
59 Ticket::STATUS_IN_PROGRESS => $langs->trans(
"InProgress"),
60 Ticket::STATUS_NOT_READ => $langs->trans(
"NotRead"),
61 Ticket::STATUS_READ => $langs->trans(
"Read"),
62 Ticket::STATUS_ASSIGNED => $langs->trans(
"Assigned"),
63 Ticket::STATUS_NEED_MORE_INFO => $langs->trans(
"NeedMoreInformationShort"),
64 Ticket::STATUS_WAITING => $langs->trans(
"Waiting"),
65 Ticket::STATUS_CLOSED => $langs->trans(
"SolvedClosed")
72include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
74if ($action ==
'updateMask') {
75 $maskconstticket =
GETPOST(
'maskconstticket',
'aZ09');
76 $maskticket =
GETPOST(
'maskticket',
'alpha');
80 if ($maskconstticket && preg_match(
'/_MASK$/', $maskconstticket)) {
81 $res =
dolibarr_set_const($db, $maskconstticket, $maskticket,
'chaine', 0,
'', $conf->entity);
93} elseif ($action ==
'set') {
96} elseif ($action ==
'del') {
99 if ($conf->global->TICKET_ADDON_PDF ==
"$value") {
103} elseif (preg_match(
'/set_(.*)/', $action, $reg)) {
105 $value = GETPOSTISSET($code) ?
GETPOSTINT($code) : 1;
106 if ($code ==
'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') >= 2) {
107 $param_notification_also_main_addressemail =
GETPOST(
'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS',
'alpha');
108 $res =
dolibarr_set_const($db,
'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', $param_notification_also_main_addressemail,
'chaine', 0,
'', $conf->entity);
118} elseif (preg_match(
'/del_(.*)/', $action, $reg)) {
124} elseif ($action ==
'setdoc') {
126 if (
dolibarr_set_const($db,
"TICKET_ADDON_PDF", $value,
'chaine', 0,
'', $conf->entity)) {
129 $conf->global->TICKET_ADDON_PDF = $value;
137} elseif ($action ==
'setmod') {
142} elseif ($action ==
'setvarworkflow') {
144 if (empty($conf->use_javascript_ajax)) {
145 $param_auto_read =
GETPOST(
'TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND',
'alpha');
146 $res =
dolibarr_set_const($db,
'TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND', $param_auto_read,
'chaine', 0,
'', $conf->entity);
151 $param_auto_assign =
GETPOST(
'TICKET_AUTO_ASSIGN_USER_CREATE',
'alpha');
152 $res =
dolibarr_set_const($db,
'TICKET_AUTO_ASSIGN_USER_CREATE', $param_auto_assign,
'chaine', 0,
'', $conf->entity);
157 $param_auto_notify_close =
GETPOST(
'TICKET_NOTIFY_AT_CLOSING',
'alpha');
158 $res =
dolibarr_set_const($db,
'TICKET_NOTIFY_AT_CLOSING', $param_auto_notify_close,
'chaine', 0,
'', $conf->entity);
164 $param_limit_view =
GETPOST(
'TICKET_LIMIT_VIEW_ASSIGNED_ONLY',
'alpha');
165 $res =
dolibarr_set_const($db,
'TICKET_LIMIT_VIEW_ASSIGNED_ONLY', $param_limit_view,
'chaine', 0,
'', $conf->entity);
170 $param_status =
GETPOST(
'TICKET_SET_STATUS_ON_ANSWER');
171 $res =
dolibarr_set_const($db,
'TICKET_SET_STATUS_ON_ANSWER', $param_status,
'chaine', 0,
'', $conf->entity);
176 $param_delay_first_response =
GETPOSTINT(
'delay_first_response');
177 $res =
dolibarr_set_const($db,
'TICKET_DELAY_BEFORE_FIRST_RESPONSE', $param_delay_first_response,
'chaine', 0,
'', $conf->entity);
182 $param_delay_between_responses =
GETPOSTINT(
'delay_between_responses');
183 $res =
dolibarr_set_const($db,
'TICKET_DELAY_SINCE_LAST_RESPONSE', $param_delay_between_responses,
'chaine', 0,
'', $conf->entity);
187} elseif ($action ==
'setvar') {
188 include_once DOL_DOCUMENT_ROOT.
"/core/lib/files.lib.php";
190 $notification_email =
GETPOST(
'TICKET_NOTIFICATION_EMAIL_FROM',
'alpha');
191 $notification_email_description =
"Sender of ticket replies sent from Dolibarr";
192 if (!empty($notification_email)) {
193 $res =
dolibarr_set_const($db,
'TICKET_NOTIFICATION_EMAIL_FROM', $notification_email,
'chaine', 0, $notification_email_description, $conf->entity);
195 $res =
dolibarr_set_const($db,
'TICKET_NOTIFICATION_EMAIL_FROM', $conf->global->MAIN_MAIL_EMAIL_FROM,
'chaine', 0, $notification_email_description, $conf->entity);
202 $notification_email_to =
GETPOST(
'TICKET_NOTIFICATION_EMAIL_TO',
'alpha');
203 $notification_email_to_description =
"Notified e-mail for ticket replies sent from Dolibarr";
204 if (!empty($notification_email_to)) {
205 $res =
dolibarr_set_const($db,
'TICKET_NOTIFICATION_EMAIL_TO', $notification_email_to,
'chaine', 0, $notification_email_to_description, $conf->entity);
207 $res =
dolibarr_set_const($db,
'TICKET_NOTIFICATION_EMAIL_TO',
'',
'chaine', 0, $notification_email_to_description, $conf->entity);
213 $mail_intro =
GETPOST(
'TICKET_MESSAGE_MAIL_INTRO',
'restricthtml');
214 $mail_intro_description =
"Introduction text of ticket replies sent from Dolibarr";
215 if (!empty($mail_intro)) {
216 $res =
dolibarr_set_const($db,
'TICKET_MESSAGE_MAIL_INTRO', $mail_intro,
'chaine', 0, $mail_intro_description, $conf->entity);
218 $res =
dolibarr_set_const($db,
'TICKET_MESSAGE_MAIL_INTRO',
'',
'chaine', 0, $mail_intro_description, $conf->entity);
224 $mail_signature =
GETPOST(
'TICKET_MESSAGE_MAIL_SIGNATURE',
'restricthtml');
225 $signature_description =
"Signature of ticket replies sent from Dolibarr";
226 if (!empty($mail_signature)) {
227 $res =
dolibarr_set_const($db,
'TICKET_MESSAGE_MAIL_SIGNATURE', $mail_signature,
'chaine', 0, $signature_description, $conf->entity);
229 $res =
dolibarr_set_const($db,
'TICKET_MESSAGE_MAIL_SIGNATURE',
'',
'chaine', 0, $signature_description, $conf->entity);
236 if (
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') >= 2 && empty($conf->use_javascript_ajax)) {
237 $param_notification_also_main_addressemail =
GETPOST(
'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS',
'alpha');
238 $res =
dolibarr_set_const($db,
'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS', $param_notification_also_main_addressemail,
'chaine', 0,
'', $conf->entity);
250$dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
255$help_url =
'EN:Module_Ticket|FR:Module_Ticket_FR';
256$page_name =
'TicketSetup';
257llxHeader(
'', $langs->trans($page_name), $help_url,
'', 0, 0,
'',
'',
'',
'mod-admin page-ticket');
260$linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
267print
dol_get_fiche_head($head,
'settings', $langs->trans(
"Module56000Name"), -1,
"ticket");
269print
'<span class="opacitymedium">'.$langs->trans(
"TicketSetupDictionaries").
'</span> : <a href="'.DOL_URL_ROOT.
'/admin/dict.php">'.$langs->trans(
"ClickHereToGoTo", $langs->transnoentitiesnoconv(
"DictionarySetup")).
'</a><br>';
280print
'<div class="div-table-responsive-no-min">';
281print
'<table class="noborder centpercent">';
282print
'<tr class="liste_titre">';
283print
'<td width="100">'.$langs->trans(
"Name").
'</td>';
284print
'<td>'.$langs->trans(
"Description").
'</td>';
285print
'<td>'.$langs->trans(
"Example").
'</td>';
286print
'<td align="center" width="60">'.$langs->trans(
"Activated").
'</td>';
287print
'<td align="center" width="40">'.$langs->trans(
"ShortInfo").
'</td>';
292foreach ($dirmodels as $reldir) {
296 $handle = opendir($dir);
297 if (is_resource($handle)) {
298 while (($file = readdir($handle)) !==
false) {
299 if (preg_match(
'/^(mod_.*)\.php$/i', $file, $reg)) {
301 $classname = substr($file, 4);
303 include_once $dir.
'/'.$file.
'.php';
305 $module =
new $file();
306 '@phan-var-force ModeleNumRefTicket $module';
309 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
313 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
317 if ($module->isEnabled()) {
318 print
'<tr class="oddeven"><td>'.$module->name.
"</td><td>\n";
319 print $module->info($langs);
323 print
'<td class="nowrap">';
324 $tmp = $module->getExample();
325 if (preg_match(
'/^Error/', $tmp)) {
326 $langs->load(
"errors");
327 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
328 } elseif ($tmp ==
'NotConfigured') {
329 print
'<span class="opacitymedium">'.$langs->trans($tmp).
'</span>';
336 print
'<td class="center">';
337 if ($conf->global->TICKET_ADDON ==
'mod_'.$classname) {
338 print
img_picto($langs->trans(
"Activated"),
'switch_on');
340 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>';
344 $ticket =
new Ticket($db);
345 $ticket->initAsSpecimen();
349 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
350 $nextval = $module->getNextValue($mysoc, $ticket);
351 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
352 $htmltooltip .=
''.$langs->trans(
"NextValue").
': ';
354 $htmltooltip .= $nextval.
'<br>';
356 $htmltooltip .= $langs->trans($module->error).
'<br>';
360 print
'<td class="center">';
361 print $formcategory->textwithpicto(
'', $htmltooltip, 1, 0);
388$sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
389$sql .=
" WHERE type = '".$db->escape($type).
"'";
390$sql .=
" AND entity = ".$conf->entity;
391$resql = $db->query($sql);
394 $num_rows = $db->num_rows($resql);
395 while ($i < $num_rows) {
396 $array = $db->fetch_array($resql);
397 if (is_array($array)) {
398 array_push($def, $array[0]);
407print
'<div class="div-table-responsive-no-min">';
408print
'<table class="noborder cenpercent">'.
"\n";
409print
'<tr class="liste_titre">'.
"\n";
410print
'<td>'.$langs->trans(
"Name").
'</td>';
411print
'<td>'.$langs->trans(
"Description").
'</td>';
412print
'<td class="center" width="60">'.$langs->trans(
"Status").
"</td>\n";
413print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
414print
'<td class="center" width="50">'.$langs->trans(
"Preview").
'</td>';
415print
'<td class="center" width="40">'.$langs->trans(
"ShortInfo").
'</td>';
420foreach ($dirmodels as $reldir) {
421 foreach (array(
'',
'/doc') as $valdir) {
422 $realpath = $reldir.
"core/modules/ticket".$valdir;
426 $handle = opendir($dir);
427 if (is_resource($handle)) {
429 while (($file = readdir($handle)) !==
false) {
435 foreach ($filelist as $file) {
436 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
437 if (file_exists($dir.
'/'.$file)) {
438 $name = substr($file, 4,
dol_strlen($file) - 16);
439 $classname = substr($file, 0,
dol_strlen($file) - 12);
441 require_once $dir.
'/'.$file;
442 $module =
new $classname($db);
443 '@phan-var-force ModelePDFTicket $module';
445 $modulequalified = 1;
446 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
447 $modulequalified = 0;
449 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
450 $modulequalified = 0;
453 if ($modulequalified) {
454 print
'<tr class="oddeven"><td width="100">';
455 print(empty($module->name) ? $name : $module->
name);
457 if (method_exists($module,
'info')) {
458 print $module->info($langs);
460 print $module->description;
465 if (in_array($name, $def)) {
466 print
'<td class="center">'.
"\n";
467 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.
newToken().
'&value='.urlencode($name).
'">';
468 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
472 print
'<td class="center">'.
"\n";
473 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>';
478 print
'<td class="center">';
480 print
img_picto($langs->trans(
"Default"),
'on');
482 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>';
487 print
'<td class="center">';
488 if ($module->type ==
'pdf') {
489 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.urlencode($name).
'">'.
img_object($langs->trans(
"Preview"),
'pdf').
'</a>';
491 print
img_object($langs->trans(
"PreviewNotAvailable"),
'generic');
496 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
497 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
498 if ($module->type ==
'pdf') {
499 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
501 $htmltooltip .=
'<br>'.$langs->trans(
"Path").
': '.preg_replace(
'/^\//',
'', $realpath).
'/'.$file;
503 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
504 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
505 $htmltooltip .=
'<br>'.$langs->trans(
"MultiLanguage").
': '.
yn($module->option_multilang, 1, 1);
511 print
'<td class="center">';
512 print $formcategory->textwithpicto(
'', $htmltooltip, 1, 0);
529print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'" enctype="multipart/form-data" >';
530print
'<input type="hidden" name="token" value="'.newToken().
'">';
531print
'<input type="hidden" name="action" value="setvarworkflow">';
532print
'<input type="hidden" name="page_y" value="">';
539print
'<div class="div-table-responsive-no-min">';
540print
'<table class="noborder centpercent">';
542print
'<tr class="liste_titre">';
543print
'<td>'.$langs->trans(
"Parameter").
'</td>';
544print
'<td>'.$langs->trans(
"Status").
"</td>\n";
545print
'<td class="center" width="40">'.$langs->trans(
"ShortInfo").
'</td>';
549print
'<tr class="oddeven"><td>'.$langs->trans(
"TicketsAutoReadTicket").
'</td>';
550print
'<td class="left">';
551if ($conf->use_javascript_ajax) {
552 print ajax_constantonoff(
'TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND');
554 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
555 print $formcategory->selectarray(
"TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND", $arrval,
getDolGlobalString(
'TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND'));
558print
'<td class="center">';
559print $formcategory->textwithpicto(
'', $langs->trans(
"TicketsAutoReadTicketHelp"), 1,
'help');
564print
'<tr class="oddeven">';
565print
'<td>'.$langs->trans(
"TicketsAutoAssignTicket").
'</td>';
566print
'<td class="left">';
567print
'<input class="minwidth100" type="text" id="TICKET_AUTO_ASSIGN_USER_CREATE" name="TICKET_AUTO_ASSIGN_USER_CREATE" value="'.getDolGlobalString(
'TICKET_AUTO_ASSIGN_USER_CREATE').
'">';
569print
'<td class="center">';
570print $formcategory->textwithpicto(
'', $langs->trans(
"TicketsAutoAssignTicketHelp"), 1,
'help');
575print
'<tr class="oddeven"><td>'.$langs->trans(
"TicketsAutoNotifyClose").
'</td>';
576print
'<td class="left">';
577if ($conf->use_javascript_ajax) {
578 print ajax_constantonoff(
'TICKET_NOTIFY_AT_CLOSING');
580 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
581 print $formcategory->selectarray(
"TICKET_NOTIFY_AT_CLOSING", $arrval,
getDolGlobalString(
'TICKET_NOTIFY_AT_CLOSING'));
584print
'<td class="center">';
585print $formcategory->textwithpicto(
'', $langs->trans(
"TicketsAutoNotifyCloseHelp"), 1,
'help');
590print
'<tr class="oddeven"><td>'.$langs->trans(
"TicketAutoChangeStatusOnAnswer").
'</td>';
591print
'<td class="left">';
592print $formcategory->selectarray(
"TICKET_SET_STATUS_ON_ANSWER", $statuslist,
getDolGlobalString(
'TICKET_SET_STATUS_ON_ANSWER'));
594print
'<td class="center">';
595print $formcategory->textwithpicto(
'', $langs->trans(
"TicketAutoChangeStatusOnAnswerHelp"), 1,
'help');
600print
'<tr class="oddeven"><td>'.$langs->trans(
"TicketAutoCheckNotifyThirdParty").
'</td>';
601print
'<td class="left">';
602if ($conf->use_javascript_ajax) {
603 print ajax_constantonoff(
'TICKET_CHECK_NOTIFY_THIRDPARTY_AT_CREATION');
605 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
606 print $formcategory->selectarray(
"TICKET_CHECK_NOTIFY_THIRDPARTY_AT_CREATION", $arrval,
getDolGlobalString(
'TICKET_CHECK_NOTIFY_THIRDPARTY_AT_CREATION'));
609print
'<td class="center">';
610print $formcategory->textwithpicto(
'', $langs->trans(
"TicketAutoCheckNotifyThirdPartyHelp"), 1,
'help');
614print
'<tr class="oddeven">';
615print
'<td>'.$langs->trans(
"TicketsDelayBeforeFirstAnswer").
"</td>";
616print
'<td class="left">
617 <input type="number" value="'.getDolGlobalString(
'TICKET_DELAY_BEFORE_FIRST_RESPONSE').
'" name="delay_first_response" class="width50">
619print
'<td class="center">';
620print $formcategory->textwithpicto(
'', $langs->trans(
"TicketsDelayBeforeFirstAnswerHelp"), 1,
'help');
624print
'<tr class="oddeven">';
625print
'<td>'.$langs->trans(
"TicketsDelayBetweenAnswers").
"</td>";
626print
'<td class="left">
627 <input type="number" value="'.getDolGlobalString(
'TICKET_DELAY_SINCE_LAST_RESPONSE').
'" name="delay_between_responses" class="width50">
629print
'<td class="center">';
630print $formcategory->textwithpicto(
'', $langs->trans(
"TicketsDelayBetweenAnswersHelp"), 1,
'help');
636print $formcategory->buttonsSaveCancel(
"Save",
'', array(), 0,
'reposition');
648print
'<table class="noborder centpercent">';
650print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'" enctype="multipart/form-data" >';
651print
'<input type="hidden" name="token" value="'.newToken().
'">';
652print
'<input type="hidden" name="action" value="setvar">';
653print
'<input type="hidden" name="page_y" value="">';
655print
'<tr class="liste_titre">';
656print
'<td colspan="2">'.$langs->trans(
"Email").
'</td>';
657print
'<td class="center" width="40">'.$langs->trans(
"ShortInfo").
'</td>';
662 print
'<td colspan="2"><div class="info">'.$langs->trans(
"TicketCkEditorEmailNotActivated").
'</div></td>';
663 print
'<td class="center" width="40">'.$langs->trans(
"ShortInfo").
'</td>';
670print
'<tr class="oddeven"><td>'.$langs->trans(
"TicketEmailNotificationFrom").
'</td>';
671print
'<td class="left">';
672print
'<input type="text" class="minwidth200" name="TICKET_NOTIFICATION_EMAIL_FROM" value="' .
getDolGlobalString(
'TICKET_NOTIFICATION_EMAIL_FROM').
'"></td>';
673print
'<td class="center">';
674print $formcategory->textwithpicto(
'', $langs->trans(
"TicketEmailNotificationFromHelp"), 1,
'help');
679print
'<tr class="oddeven"><td>'.$langs->trans(
"TicketEmailNotificationTo").
'</td>';
680print
'<td class="left">';
681print
'<input type="text" class="minwidth200" name="TICKET_NOTIFICATION_EMAIL_TO" value="'.(getDolGlobalString(
'TICKET_NOTIFICATION_EMAIL_TO') ? $conf->global->TICKET_NOTIFICATION_EMAIL_TO :
'').
'"></td>';
682print
'<td class="center">';
683print $formcategory->textwithpicto(
'', $langs->trans(
"TicketEmailNotificationToHelp"), 1,
'help');
689 print
'<tr class="oddeven"><td>'.$langs->trans(
"TicketsEmailAlsoSendToMainAddress").
'</td>';
690 print
'<td class="left">';
691 if ($conf->use_javascript_ajax) {
692 print ajax_constantonoff(
'TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS');
694 $arrval = array(
'0' => $langs->trans(
"No"),
'1' => $langs->trans(
"Yes"));
695 print $formcategory->selectarray(
"TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS", $arrval, $conf->global->TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS);
698 print
'<td class="center">';
699 print $formcategory->textwithpicto(
'', $langs->trans(
"TicketsEmailAlsoSendToMainAddressHelp"), 1,
'help');
706print
'<tr class="oddeven"><td>'.$langs->trans(
"TicketMessageMailIntro");
708require_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
709$doleditor =
new DolEditor(
'TICKET_MESSAGE_MAIL_INTRO', $mail_intro,
'100%', 90,
'dolibarr_mailings',
'',
false,
true,
getDolGlobalInt(
'FCKEDITOR_ENABLE_MAIL'), ROWS_2,
'70');
712print
'<td class="center">';
713print $formcategory->textwithpicto(
'', $langs->trans(
"TicketMessageMailIntroHelpAdmin"), 1,
'help');
718print
'<tr class="oddeven"><td>'.$langs->trans(
"TicketMessageMailFooter").
'</label>';
720require_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
721$doleditor =
new DolEditor(
'TICKET_MESSAGE_MAIL_SIGNATURE', $mail_signature,
'100%', 90,
'dolibarr_mailings',
'',
false,
true,
getDolGlobalInt(
'FCKEDITOR_ENABLE_MAIL'), ROWS_2,
'70');
724print
'<td class="center">';
725print $formcategory->textwithpicto(
'', $langs->trans(
"TicketMessageMailFooterHelpAdmin"), 1,
'help');
730print $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.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
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)
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
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.
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'.
yn($yesno, $format=1, $color=0)
Return yes or no in current language.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
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 a 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.