Newer
Older
'<b>'.Format::htmlchars($ticket->getName()).'</b>', Format::htmlchars($ticket->getEmail())); ?>
<?php echo sprintf(__('Are you sure want to <b>change</b> ticket owner to %s?'),
'<b><span id="newuser">this guy</span></b>'); ?>
<p class="confirm-action" style="display:none;" id="delete-confirm">
<font color="red"><strong><?php echo __('Are you sure you want to DELETE this ticket?');?></strong></font>
<br><br><?php echo __('Deleted tickets CANNOT be recovered, including any associated attachments.');?>
</p>
<div><?php echo __('Please confirm to continue.');?></div>
<form action="tickets.php?id=<?php echo $ticket->getId(); ?>" method="post" id="confirm-form" name="confirm-form">
<?php csrf_token(); ?>
<input type="hidden" name="id" value="<?php echo $ticket->getId(); ?>">
<input type="hidden" name="a" value="process">
<input type="hidden" name="do" id="action" value="">
<hr style="margin-top:1em"/>
<p class="full-width">
<span class="buttons pull-left">
<input type="button" value="<?php echo __('Cancel');?>" class="close">
</span>
<span class="buttons pull-right">
<input type="submit" value="<?php echo __('OK');?>">
</span>
</p>
</form>
<div class="clear"></div>
</div>
<script type="text/javascript">
$(function() {
$(document).on('click', 'a.change-user', function(e) {
e.preventDefault();
var tid = <?php echo $ticket->getOwnerId(); ?>;
var cid = <?php echo $ticket->getOwnerId(); ?>;
var url = 'ajax.php/'+$(this).attr('href').substr(1);
$.userLookup(url, function(user) {
if(cid!=user.id
&& $('.dialog#confirm-action #changeuser-confirm').length) {
$('#newuser').html(user.name +' <'+user.email+'>');
$('.dialog#confirm-action #action').val('changeuser');
$('#confirm-form').append('<input type=hidden name=user_id value='+user.id+' />');
$('#overlay').show();
$('.dialog#confirm-action .confirm-action').hide();
$('.dialog#confirm-action p#changeuser-confirm')
.show()
.parent('div').show().trigger('click');
}
});
});
});
</script>