Ticket card: enhance closing modal to allow chosing contacts to notify
This commit is contained in:
parent
dcc41d0ab7
commit
e4ed4b8307
@ -820,10 +820,28 @@ if ($action == 'create' || $action == 'presend') {
|
|||||||
|
|
||||||
// Confirmation close
|
// Confirmation close
|
||||||
if ($action == 'close') {
|
if ($action == 'close') {
|
||||||
print $form->formconfirm($url_page_current."?track_id=".$object->track_id, $langs->trans("CloseATicket"), $langs->trans("ConfirmCloseAticket"), "confirm_close", '', '', 1);
|
$thirdparty_contacts = $object->getInfosTicketExternalContact();
|
||||||
if ($ret == 'html') {
|
$contacts_select = array(
|
||||||
print '<br>';
|
'-2' => $langs->trans('TicketNotifyAllTiersAtClose'),
|
||||||
|
'-3' => $langs->trans('TicketNotNotifyTiersAtClose')
|
||||||
|
);
|
||||||
|
foreach ($thirdparty_contacts as $thirdparty_contact) {
|
||||||
|
$contacts_select[$thirdparty_contact['id']] = $thirdparty_contact['civility'] . ' ' . $thirdparty_contact['lastname'] . ' ' . $thirdparty_contact['firstname'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Default select all or no contact
|
||||||
|
$default = (!empty($conf->global->TICKET_NOTIFY_AT_CLOSING)) ? -2 : -3;
|
||||||
|
$formquestion = array(
|
||||||
|
array(
|
||||||
|
'name' => 'contactid',
|
||||||
|
'type' => 'select',
|
||||||
|
'label' => $langs->trans('NotifyThirdpartyOnTicketClosing'),
|
||||||
|
'values' => $contacts_select,
|
||||||
|
'default' => $default
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
print $form->formconfirm($url_page_current."?track_id=".$object->track_id, $langs->trans("CloseATicket"), $langs->trans("ConfirmCloseAticket"), "confirm_close", $formquestion, '', 1 );
|
||||||
}
|
}
|
||||||
// Confirmation abandon
|
// Confirmation abandon
|
||||||
if ($action == 'abandon') {
|
if ($action == 'abandon') {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user