Jump to content

CTRL + Enter JavaScript - Reply Ticket Admin


edvancombr

Recommended Posts

Hi,

When answering a ticket (administrative area) you can use the command combination (CTRL + ENTER) and the ticket will be answered.

<?php

/**
* CTRL + Enter - Reply Ticket Admin
* @author edvancombr - whmcs.blog.br
*/

function hook_replyticketadmin($vars) {	
if ($vars[filename]=="supporttickets"){
$script='<script type="text/javascript">window.onload = function () {
	document.getElementById("replymessage").onkeydown = function (e) {
		if (e.keyCode == 13 && e.ctrlKey){
			document.getElementById("btnPostReply").click();	// WHMCS v7.x
			//document.getElementById("postreplybutton").click();	// WHMCS v6.x			
			return false; 
		}
	}
}
</script>';         
    return $script;
	
}
}
add_hook("AdminAreaHeadOutput",1,"hook_replyticketadmin");

https://www.whmcs.blog.br/principal/customizacao-area-administrativa-respondendo-ticket/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated