Add button to create a ticket based on calendar details
This commit is contained in:
parent
9138a32533
commit
e771090e51
@ -285,10 +285,10 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
<i class="fa fa-trash"></i>
|
||||
<span>Delete</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" id="create-ticket-button">
|
||||
<a href="#" class="btn btn-primary" id="create-ticket-button">
|
||||
<i class="fa fa-plus"></i>
|
||||
<span>Create Ticket</span>
|
||||
</button>
|
||||
</a>
|
||||
<button type="button" class="btn btn-default cancel-callback" data-dismiss="modal">
|
||||
<i class="fa fa-times-circle"></i>
|
||||
<span>Cancel</span>
|
||||
|
@ -6,4 +6,8 @@ echo "
|
||||
function getHelpdeskUrl() {
|
||||
return '".$hesk_settings['hesk_url']."';
|
||||
}
|
||||
|
||||
function getAdminDirectory() {
|
||||
return '".$hesk_settings['admin_dir']."';
|
||||
}
|
||||
";
|
@ -296,5 +296,14 @@ function displayEditModal(date) {
|
||||
.find('input[name="end-date"]').val(date.end.format('YYYY-MM-DD')).end()
|
||||
.find('input[name="id"]').val(date.id).end();
|
||||
|
||||
var createTicketLink = getHelpdeskUrl() + '/' + getAdminDirectory() + '/new_ticket.php?subject=';
|
||||
createTicketLink += encodeURI('[' + date.start.format('YYYY-MM-DD') + '] ' + date.title);
|
||||
if (date.location != '') {
|
||||
createTicketLink += encodeURI(' @ ' + date.location);
|
||||
}
|
||||
createTicketLink += encodeURI('&message=' + date.comments);
|
||||
|
||||
$form.find('#create-ticket-button').prop('href', createTicketLink);
|
||||
|
||||
$('#edit-event-modal').modal('show');
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user