';
if ($conf->use_javascript_ajax) {
print ajax_constantonoff('TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS');
@@ -474,7 +360,8 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
}
// Limiter la vue des tickets à ceux assignés à l'utilisateur
-print '
';
print '';
// End of page
diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php
index 62615fb0ecd..406f53c4762 100644
--- a/htdocs/core/lib/ticket.lib.php
+++ b/htdocs/core/lib/ticket.lib.php
@@ -40,11 +40,17 @@ function ticketAdminPrepareHead()
$head[$h][1] = $langs->trans("TicketSettings");
$head[$h][2] = 'settings';
$h++;
+
$head[$h][0] = DOL_URL_ROOT.'/admin/ticket_extrafields.php';
$head[$h][1] = $langs->trans("ExtraFieldsTicket");
$head[$h][2] = 'attributes';
$h++;
+ $head[$h][0] = DOL_URL_ROOT.'/admin/ticket_public.php';
+ $head[$h][1] = $langs->trans("PublicInterface");
+ $head[$h][2] = 'public';
+ $h++;
+
// Show more tabs from modules
// Entries must be declared in modules descriptor with line
//$this->tabs = array(
diff --git a/htdocs/core/modules/modTicket.class.php b/htdocs/core/modules/modTicket.class.php
index e6deef76144..0ca3b3c99be 100644
--- a/htdocs/core/modules/modTicket.class.php
+++ b/htdocs/core/modules/modTicket.class.php
@@ -103,9 +103,10 @@ class modTicket extends DolibarrModules
// List of particular constants to add when module is enabled
// (key, 'chaine', value, desc, visible, 'current' or 'allentities', deleteonunactive)
// Example:
- $this->const = array();
- $this->const[1] = array('TICKET_ENABLE_PUBLIC_INTERFACE', 'chaine', '1', 'Enable ticket public interface');
- $this->const[2] = array('TICKET_ADDON', 'chaine', 'mod_ticket_simple', 'Ticket ref module');
+ $this->const = array(
+ 1 => array('TICKET_ENABLE_PUBLIC_INTERFACE', 'chaine', '0', 'Enable ticket public interface', 0),
+ 2 => array('TICKET_ADDON', 'chaine', 'mod_ticket_simple', 'Ticket ref module', 0)
+ );
$this->tabs = array(
'thirdparty:+ticket:Tickets:@ticket:$user->rights->ticket->read:/ticket/list.php?socid=__ID__',
diff --git a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php
index c8a31a70e40..12baad3b1d5 100644
--- a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php
+++ b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php
@@ -187,7 +187,7 @@ class InterfaceTicketEmail extends DolibarrTriggers
// Send email to notification email
- if (empty($conf->global->TICKET_DISABLE_ALL_MAILS) && empty($object->context['disableticketemail']))
+ if (! empty($conf->global->TICKET_NOTIFICATION_EMAIL_TO) && empty($object->context['disableticketemail']))
{
$sendto = $conf->global->TICKET_NOTIFICATION_EMAIL_TO;
@@ -227,6 +227,8 @@ class InterfaceTicketEmail extends DolibarrTriggers
$message_admin = dol_nl2br($message_admin);
+ $trackid = 'tic'.$object->id;
+
if (!empty($conf->global->TICKET_DISABLE_MAIL_AUTOCOPY_TO)) {
$old_MAIN_MAIL_AUTOCOPY_TO = $conf->global->MAIN_MAIL_AUTOCOPY_TO;
$conf->global->MAIN_MAIL_AUTOCOPY_TO = '';
@@ -246,7 +248,7 @@ class InterfaceTicketEmail extends DolibarrTriggers
// Send email to customer
- if (empty($conf->global->TICKET_DISABLE_ALL_MAILS) && empty($object->context['disableticketemail']) && $object->notify_tiers_at_create)
+ if (empty($conf->global->TICKET_DISABLE_CUSTOMER_MAILS) && empty($object->context['disableticketemail']) && $object->notify_tiers_at_create)
{
$sendto = '';
if (empty($user->socid) && empty($user->email)) {
@@ -301,12 +303,14 @@ class InterfaceTicketEmail extends DolibarrTriggers
$message_customer = dol_nl2br($message_customer);
+ $trackid = 'tic'.$object->id;
+
if (!empty($conf->global->TICKET_DISABLE_MAIL_AUTOCOPY_TO)) {
$old_MAIN_MAIL_AUTOCOPY_TO = $conf->global->MAIN_MAIL_AUTOCOPY_TO;
$conf->global->MAIN_MAIL_AUTOCOPY_TO = '';
}
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
- $mailfile = new CMailFile($subject, $sendto, $from, $message_customer, $filepath, $mimetype, $filename, $sendtocc, '', $deliveryreceipt, -1);
+ $mailfile = new CMailFile($subject, $sendto, $from, $message_customer, $filepath, $mimetype, $filename, $sendtocc, '', $deliveryreceipt, -1, '', '', $trackid);
if ($mailfile->error) {
dol_syslog($mailfile->error, LOG_DEBUG);
} else {
@@ -317,6 +321,7 @@ class InterfaceTicketEmail extends DolibarrTriggers
}
}
}
+
$ok = 1;
break;
diff --git a/htdocs/langs/en_US/ticket.lang b/htdocs/langs/en_US/ticket.lang
index 6366e93e375..fcb76bd3007 100644
--- a/htdocs/langs/en_US/ticket.lang
+++ b/htdocs/langs/en_US/ticket.lang
@@ -87,14 +87,14 @@ TicketEmailNotificationFrom=Notification email from
TicketEmailNotificationFromHelp=Used into ticket message answer by example
TicketEmailNotificationTo=Notifications email to
TicketEmailNotificationToHelp=Send email notifications to this address.
-TicketNewEmailBodyLabel=Text message sent after creating a ticket (public interface)
+TicketNewEmailBodyLabel=Text message sent after creating a ticket
TicketNewEmailBodyHelp=The text specified here will be inserted into the email confirming the creation of a new ticket from the public interface. Information on the consultation of the ticket are automatically added.
TicketParamPublicInterface=Public interface setup
TicketsEmailMustExist=Require an existing email address to create a ticket
TicketsEmailMustExistHelp=In the public interface, the email address should already be filled in the database to create a new ticket.
PublicInterface=Public interface
-TicketUrlPublicInterfaceLabelAdmin=Public interface URL
-TicketUrlPublicInterfaceHelpAdmin=It is possible to define an alias to the web server and thus make available the public interface to another IP address.
+TicketUrlPublicInterfaceLabelAdmin=Alternative URL for public interface
+TicketUrlPublicInterfaceHelpAdmin=It is possible to define an alias to the web server and thus make available the public interface with another URL (the server must act as a proxy on this new URL)
TicketPublicInterfaceTextHomeLabelAdmin=Welcome text of the public interface
TicketPublicInterfaceTextHome=You can create a support ticket or view existing from its identifier tracking ticket.
TicketPublicInterfaceTextHomeHelpAdmin=The text defined here will appear on the home page of the public interface.
@@ -124,7 +124,7 @@ TicketsAutoAssignTicketHelp=When creating a ticket, the user can be automaticall
TicketNumberingModules=Tickets numbering module
TicketNotifyTiersAtCreation=Notify third party at creation
TicketGroup=Group
-
+TicketsDisableCustomerEmail=Alsways disable emails when a ticket is created from public interface
#
# Index & list page
#
@@ -267,7 +267,7 @@ ErrorEmailMustExistToCreateTicket=Error: email address not found in our database
TicketNewEmailSubjectAdmin=New ticket created
TicketNewEmailBodyAdmin=
Ticket has just been created with ID #%s, see information:
SeeThisTicketIntomanagementInterface=See ticket in management interface
-TicketPublicInterfaceForbidden=Access for this area: forbidden
+TicketPublicInterfaceForbidden=The public interface for the tickets was not enabled
# notifications
TicketNotificationEmailSubject=Ticket %s updated
diff --git a/htdocs/public/ticket/index.php b/htdocs/public/ticket/index.php
index ca29f89d39e..5e241c4edfb 100644
--- a/htdocs/public/ticket/index.php
+++ b/htdocs/public/ticket/index.php
@@ -45,10 +45,11 @@ $langs->loadLangs(array('companies', 'other', 'ticket', 'errors'));
$track_id = GETPOST('track_id', 'alpha');
$action = GETPOST('action', 'alpha');
-/***************************************************
- * VIEW
- *
- ****************************************************/
+
+/*
+ * View
+ */
+
$form = new Form($db);
$formticket = new FormTicket($db);
@@ -62,9 +63,9 @@ if (!$conf->global->TICKET_ENABLE_PUBLIC_INTERFACE) {
print '