Bug #417
Blank Post Reply and Comment in knowledgebase throws exception
Status: | Resolved | Start date: | 03 Sep 2014 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | % Done: | 0% |
||
Category: | - | |||
Target version: | - |
History
Updated by Mansi Wason over 10 years ago
- Status changed from New to Resolved
1. Add code at the end in /templates/kayako/js/kayako.js
function validateReply() {
if ($("#replycontents").val() '') {
alert('Please enter message to reply!');
return false;
}
return true;
}
function validateComment() {
if ($("#postnewcomment").val() '') {
alert('Please enter the comment!');
return false;
}
return true;
}
2. Edit /templates/kayako/viewticket.tpl
Line 118 Replace with
<form method="post" action="{$_submitURL}?action=reply&ticketid={$_ticketContainer.ticketid}" name="TicketReplyForm" enctype="multipart/form-data" onsubmit="return validateReply();">
3. Edit /templates/kayako/comments.tpl
Line 26 Replace with
<form method="post" action="{$_commentSubmitURL}" enctype="multipart/form-data" name="CommentsForm" onsubmit="return validateComment();">