Jump to content

Ticket close require client to enter message


neo.ealink

Recommended Posts

Hi,

I was wondering whether anyone have any idea on how to make sure when the client tried to close the ticket, they are required to enter any message?

It is a validation for the client that want to close the ticket and will be a reference to us in the future.

For the moment, I just manage to modified the viewticket.tpl and put this javascript code for validation :

 

{literal}
<script type="text/javascript">
function myFunc(args) 
{
  var text2 = $("#replymessage").val();

  if (text2)
  {
  window.location.replace("{/literal}{$smarty.server.PHP_SELF}{literal}?tid={/literal}{$tid}{literal}&c={/literal}{$c}{literal}&postreply=true&closeticket=true");

  }
  else
  alert(text + "Please enter reason or solution in the reply message area before closing this ticket!");

}

</script>
{/literal}
<p align="center"><input type="button" value="{$LANG.supportticketsstatuscloseticket}" onclick="myFunc()" class="closeticket" /></p>

 

The issue is that, by using these code above, It closes the ticket but the reply was never sent and never saved in the database.

Since there is no hook for "ticketClose", so, I really need to know is there any other solution for this?

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.

×
×
  • 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