Merge pull request #20040 from thomas-Ngr/develop_ticket_config_auto_read
ticket config: auto read ticket
This commit is contained in:
commit
ec71eb410e
@ -143,6 +143,20 @@ if ($action == 'updateMask') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($action == 'setvarworkflow') {
|
||||||
|
$param_auto_read = GETPOST('TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND', 'alpha');
|
||||||
|
$res = dolibarr_set_const($db, 'TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND', $param_auto_read, 'chaine', 0, '', $conf->entity);
|
||||||
|
if (!($res > 0)) {
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$param_auto_assign = GETPOST('TICKET_AUTO_ASSIGN_USER_CREATE', 'alpha');
|
||||||
|
$res = dolibarr_set_const($db, 'TICKET_AUTO_ASSIGN_USER_CREATE', $param_auto_assign, 'chaine', 0, '', $conf->entity);
|
||||||
|
if (!($res > 0)) {
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($action == 'setvarother') {
|
if ($action == 'setvarother') {
|
||||||
$param_must_exists = GETPOST('TICKET_EMAIL_MUST_EXISTS', 'alpha');
|
$param_must_exists = GETPOST('TICKET_EMAIL_MUST_EXISTS', 'alpha');
|
||||||
$res = dolibarr_set_const($db, 'TICKET_EMAIL_MUST_EXISTS', $param_must_exists, 'chaine', 0, '', $conf->entity);
|
$res = dolibarr_set_const($db, 'TICKET_EMAIL_MUST_EXISTS', $param_must_exists, 'chaine', 0, '', $conf->entity);
|
||||||
@ -177,12 +191,6 @@ if ($action == 'setvarother') {
|
|||||||
if (!($res > 0)) {
|
if (!($res > 0)) {
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$param_auto_assign = GETPOST('TICKET_AUTO_ASSIGN_USER_CREATE', 'alpha');
|
|
||||||
$res = dolibarr_set_const($db, 'TICKET_AUTO_ASSIGN_USER_CREATE', $param_auto_assign, 'chaine', 0, '', $conf->entity);
|
|
||||||
if (!($res > 0)) {
|
|
||||||
$error++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -467,7 +475,7 @@ print '</div><br>';
|
|||||||
if (!$conf->use_javascript_ajax) {
|
if (!$conf->use_javascript_ajax) {
|
||||||
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'" enctype="multipart/form-data" >';
|
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'" enctype="multipart/form-data" >';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="action" value="setvarother">';
|
print '<input type="hidden" name="action" value="setvarworkflow">';
|
||||||
}
|
}
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("Other"), '', '');
|
print load_fiche_titre($langs->trans("Other"), '', '');
|
||||||
@ -479,6 +487,21 @@ print '<td></td>';
|
|||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
// Auto mark ticket read when created from backoffice
|
||||||
|
print '<tr class="oddeven"><td>'.$langs->trans("TicketsAutoReadTicket").'</td>';
|
||||||
|
print '<td class="left">';
|
||||||
|
if ($conf->use_javascript_ajax) {
|
||||||
|
print ajax_constantonoff('TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND');
|
||||||
|
} else {
|
||||||
|
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||||
|
print $form->selectarray("TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND", $arrval, $conf->global->TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND);
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
print '<td class="center">';
|
||||||
|
print $form->textwithpicto('', $langs->trans("TicketsAutoReadTicketHelp"), 1, 'help');
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
// Auto assign ticket at user who created it
|
// Auto assign ticket at user who created it
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketsAutoAssignTicket").'</td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("TicketsAutoAssignTicket").'</td>';
|
||||||
print '<td class="left">';
|
print '<td class="left">';
|
||||||
|
|||||||
@ -106,7 +106,8 @@ class modTicket extends DolibarrModules
|
|||||||
$this->const = array(
|
$this->const = array(
|
||||||
1 => array('TICKET_ENABLE_PUBLIC_INTERFACE', 'chaine', '0', 'Enable ticket public interface', 0),
|
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),
|
2 => array('TICKET_ADDON', 'chaine', 'mod_ticket_simple', 'Ticket ref module', 0),
|
||||||
3 => array('TICKET_ADDON_PDF_ODT_PATH', 'chaine', 'DOL_DATA_ROOT/doctemplates/tickets', 'Ticket templates ODT/ODS directory for templates', 0)
|
3 => array('TICKET_ADDON_PDF_ODT_PATH', 'chaine', 'DOL_DATA_ROOT/doctemplates/tickets', 'Ticket templates ODT/ODS directory for templates', 0),
|
||||||
|
4 => array('TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND', 'chaine', 0, 'Automatically mark ticket as read when created from backend', 0)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -517,6 +517,7 @@ or=or
|
|||||||
Other=Other
|
Other=Other
|
||||||
Others=Others
|
Others=Others
|
||||||
OtherInformations=Other information
|
OtherInformations=Other information
|
||||||
|
Workflow=Workflow
|
||||||
Quantity=Quantity
|
Quantity=Quantity
|
||||||
Qty=Qty
|
Qty=Qty
|
||||||
ChangedBy=Changed by
|
ChangedBy=Changed by
|
||||||
|
|||||||
@ -136,6 +136,9 @@ TicketsPublicNotificationNewMessage=Send email(s) when a new message/comment is
|
|||||||
TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to)
|
TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to)
|
||||||
TicketPublicNotificationNewMessageDefaultEmail=Notifications email to (update)
|
TicketPublicNotificationNewMessageDefaultEmail=Notifications email to (update)
|
||||||
TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email.
|
TicketPublicNotificationNewMessageDefaultEmailHelp=Send an email to this address for each new message notifications if the ticket doesn't have a user assigned to it or if the user doesn't have any known email.
|
||||||
|
TicketsAutoReadTicket=Automatically mark the ticket as read
|
||||||
|
TicketsAutoReadTicketHelp=Automatically mark the ticket as read when created from backoffice.
|
||||||
|
|
||||||
#
|
#
|
||||||
# Index & list page
|
# Index & list page
|
||||||
#
|
#
|
||||||
|
|||||||
@ -517,6 +517,7 @@ or=ou
|
|||||||
Other=Autre
|
Other=Autre
|
||||||
Others=Autres
|
Others=Autres
|
||||||
OtherInformations=Autre information
|
OtherInformations=Autre information
|
||||||
|
Workflow=Processus de travail
|
||||||
Quantity=Quantité
|
Quantity=Quantité
|
||||||
Qty=Qté
|
Qty=Qté
|
||||||
ChangedBy=Modifié par
|
ChangedBy=Modifié par
|
||||||
|
|||||||
@ -136,6 +136,9 @@ TicketsPublicNotificationNewMessage=Envoyer un ou des emails lorsqu’un nouveau
|
|||||||
TicketsPublicNotificationNewMessageHelp=Envoyer un (des) courriel(s) lorsqu’un nouveau message est ajouté à partir de l’interface publique (à l’utilisateur désigné ou au courriel de notification (mise à jour) et/ou au courriel de notification)
|
TicketsPublicNotificationNewMessageHelp=Envoyer un (des) courriel(s) lorsqu’un nouveau message est ajouté à partir de l’interface publique (à l’utilisateur désigné ou au courriel de notification (mise à jour) et/ou au courriel de notification)
|
||||||
TicketPublicNotificationNewMessageDefaultEmail=Emails de notifications à (mise à jour)
|
TicketPublicNotificationNewMessageDefaultEmail=Emails de notifications à (mise à jour)
|
||||||
TicketPublicNotificationNewMessageDefaultEmailHelp=Envoyez un email à cette adresse email pour chaque nouveau message de notifications si le ticket n'a pas d'utilisateur assigné ou si l'utilisateur n'a pas d'email connu.
|
TicketPublicNotificationNewMessageDefaultEmailHelp=Envoyez un email à cette adresse email pour chaque nouveau message de notifications si le ticket n'a pas d'utilisateur assigné ou si l'utilisateur n'a pas d'email connu.
|
||||||
|
TicketsAutoReadTicket=Automatiquement marquer le ticket comme lu
|
||||||
|
TicketsAutoReadTicketHelp=Automatiquement marquer le ticket comme lu s'il est créé depuis le backoffice.
|
||||||
|
|
||||||
#
|
#
|
||||||
# Index & list page
|
# Index & list page
|
||||||
#
|
#
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user