Skip to content

Commit

Permalink
Version 5.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bytestream committed Feb 12, 2024
1 parent 2a845f1 commit 2974148
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions operator/js/ticket_view.js
Expand Up @@ -1178,8 +1178,7 @@
} else {
ticket.setMessageDraft(messageWithoutCursorMarker);
}

// Make AJAX data.
var $usages = $form.find('input[name="cannedresponse_usage[]"]');
var data = {
_token: $('meta[name=csrf_token]').prop('content'),
ticket: [ticket.parameters().ticketId],
Expand All @@ -1190,9 +1189,13 @@
to_address: type == '2' ? $form.find('select[name="to_address[]"]').val() : null,
cc_address: type == '2' ? $form.find('select[name="cc_address[]"]').val() : null,
bcc_address: type == '2' ? $form.find('select[name="bcc_address[]"]').val() : null,
subject: type == '2' ? $form.find('input[name="subject"]').val() : null
subject: type == '2' ? $form.find('input[name="subject"]').val() : null,
cannedresponse_usage: $usages.val()
};

// Remove them otherwise their usage will be counted twice (when the message is posted).
$usages.remove();

// Add attachments to AJAX data.
$($form.find('input[name^="attachment["]:not(:disabled)').serializeArray()).each(function (index, obj) {
data[obj.name] = obj.value;
Expand Down

0 comments on commit 2974148

Please sign in to comment.