allow delays configuration from ticket module params
This commit is contained in:
parent
ad3f7b531e
commit
5d10d6cb78
@ -191,6 +191,18 @@ if ($action == 'setvarother') {
|
|||||||
if (!($res > 0)) {
|
if (!($res > 0)) {
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$param_delay_first_response = GETPOST('delay_first_response', 'int');
|
||||||
|
$res = dolibarr_set_const($db, 'TICKET_DELAY_BEFORE_FIRST_RESPONSE', $param_delay_first_response, 'chaine', 0, '', $conf->entity);
|
||||||
|
if (!($res > 0)) {
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$param_delay_between_responses = GETPOST('delay_between_responses', 'int');
|
||||||
|
$res = dolibarr_set_const($db, 'TICKET_DELAY_SINCE_LAST_RESPONSE', $param_delay_between_responses, 'chaine', 0, '', $conf->entity);
|
||||||
|
if (!($res > 0)) {
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -503,7 +515,8 @@ print '</td>';
|
|||||||
print '</tr>';
|
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">';
|
||||||
|
print '<td>'.$langs->trans("TicketsAutoAssignTicket").'</td>';
|
||||||
print '<td class="left">';
|
print '<td class="left">';
|
||||||
if ($conf->use_javascript_ajax) {
|
if ($conf->use_javascript_ajax) {
|
||||||
print ajax_constantonoff('TICKET_AUTO_ASSIGN_USER_CREATE');
|
print ajax_constantonoff('TICKET_AUTO_ASSIGN_USER_CREATE');
|
||||||
@ -517,12 +530,41 @@ print $form->textwithpicto('', $langs->trans("TicketsAutoAssignTicketHelp"), 1,
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '</table><br>';
|
|
||||||
|
|
||||||
if (!$conf->use_javascript_ajax) {
|
if (!$conf->use_javascript_ajax) {
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Define wanted maximum time elapsed before answers to tickets
|
||||||
|
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'" enctype="multipart/form-data" >';
|
||||||
|
print '<input type="hidden" name="action" value="setvarother">';
|
||||||
|
|
||||||
|
print '<tr class="oddeven">';
|
||||||
|
print '<td>'.$langs->trans("TicketsDelayBeforeFirstAnswer")."</td>";
|
||||||
|
print '<td class="left">
|
||||||
|
<input type="number" value="'.$conf->global->TICKET_DELAY_BEFORE_FIRST_RESPONSE.'" name="delay_first_response">
|
||||||
|
<input type="submit" class="button small" value="'.$langs->trans("Save").'">
|
||||||
|
</td>';
|
||||||
|
print '<td class="center">';
|
||||||
|
print $form->textwithpicto('', $langs->trans("TicketsDelayBeforeFirstAnswerHelp"), 1, 'help');
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
print '<tr class="oddeven">';
|
||||||
|
print '<td>'.$langs->trans("TicketsDelayBetweenAnswers")."</td>";
|
||||||
|
print '<td class="left">
|
||||||
|
<input type="number" value="'.$conf->global->TICKET_DELAY_SINCE_LAST_RESPONSE.'" name="delay_between_responses">
|
||||||
|
<input type="submit" class="button small" value="'.$langs->trans("Save").'">
|
||||||
|
</td>';
|
||||||
|
print '<td class="center">';
|
||||||
|
print $form->textwithpicto('', $langs->trans("TicketsDelayBetweenAnswersHelp"), 1, 'help');
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
|
print '</table><br>';
|
||||||
|
|
||||||
|
|
||||||
// Admin var of module
|
// Admin var of module
|
||||||
print load_fiche_titre($langs->trans("Notification"), '', '');
|
print load_fiche_titre($langs->trans("Notification"), '', '');
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user