ticket config : add TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND option to config panel

This commit is contained in:
Thomas Negre 2022-02-03 12:08:39 +01:00
parent b69beb98b8
commit 39bd5dd6dc
5 changed files with 32 additions and 3 deletions

View File

@ -178,8 +178,14 @@ if ($action == 'setvarother') {
$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);
$param_auto_assign = GETPOST('TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND', 'alpha');
$res = dolibarr_set_const($db, 'TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND', $param_auto_assign, 'chaine', 0, '', $conf->entity);
if (!($res > 0)) {
$error++;
}
$param_auto_read = GETPOST('TICKET_AUTO_ASSIGN_USER_CREATE', 'alpha');
$res = dolibarr_set_const($db, 'TICKET_AUTO_ASSIGN_USER_CREATE', $param_auto_read, 'chaine', 0, '', $conf->entity);
if (!($res > 0)) {
$error++;
}
@ -470,7 +476,7 @@ if (!$conf->use_javascript_ajax) {
print '<input type="hidden" name="action" value="setvarother">';
}
print load_fiche_titre($langs->trans("Other"), '', '');
print load_fiche_titre($langs->trans("Workflow"), '', '');
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
@ -479,6 +485,21 @@ print '<td></td>';
print '<td></td>';
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
print '<tr class="oddeven"><td>'.$langs->trans("TicketsAutoAssignTicket").'</td>';
print '<td class="left">';

View File

@ -517,6 +517,7 @@ or=or
Other=Other
Others=Others
OtherInformations=Other information
Workflow=Workflow
Quantity=Quantity
Qty=Qty
ChangedBy=Changed by

View File

@ -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)
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.
TicketsAutoReadTicket=Automatically mark the ticket as read
TicketsAutoReadTicketHelp=Automatically mark the ticket as read when created from backoffice.
#
# Index & list page
#

View File

@ -517,6 +517,7 @@ or=ou
Other=Autre
Others=Autres
OtherInformations=Autre information
Workflow=Processus de travail
Quantity=Quantité
Qty=Qté
ChangedBy=Modifié par

View File

@ -136,6 +136,9 @@ TicketsPublicNotificationNewMessage=Envoyer un ou des emails lorsquun nouveau
TicketsPublicNotificationNewMessageHelp=Envoyer un (des) courriel(s) lorsquun nouveau message est ajouté à partir de linterface publique (à lutilisateur désigné ou au courriel de notification (mise à jour) et/ou au courriel de notification)
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.
TicketsAutoReadTicket=Automatiquement marquer le ticket comme lu
TicketsAutoReadTicketHelp=Automatiquement marquer le ticket comme lu s'il est créé depuis le backoffice.
#
# Index & list page
#