Update for Latest Version
Here are the changes to add this for version 1.6. Please note that my install is VERY heavily modified, I believe that this only depends on stock functions and should work for a fresh install as well. Also this is the first time I have created patches so let me know if I did it correctly.
tickets.php:
--- tickets.php
+++ tickets.php @@ -60,7 +60,12 @@
if(!$errors){
//Everything checked out...do the magic.
- if(($msgid=$ticket->postMessage($_POST,'Web'))) {
+ //if(($msgid=$ticket->postMessage($_POST,'Web'))) {
+ if(($msgid=$ticket->postMessage($_POST,'','Web',$_POST))) {
+ //Set status if any.
+ if(isset($_POST) && $_POST=="Close")
+ $ticket->setStatus($_POST);
+ // $ticket->postMessage("Ticket Closed by requestor - ".$thisclient->getEmail());
if($_FILES && $cfg->canUploadFiles() && $cfg->allowOnlineAttachments())
$ticket->uploadAttachment($_FILES,$msgid,'M');
include/client/viewticket.php:
--- include/client/viewticket.inc.php
+++ include/client/viewticket.inc.php
@@ -134,9 +134,13 @@
</div>
<?}?>
<div align="left" style="padding 0 10px 0;">
- <input class="button" type='submit' value='Post Reply' />
- <input class="button" type='reset' value='Reset' />
- <input class="button" type='button' value='Cancel' onClick='window.location.href="view.php"' />
+ <? $checked=isset($info)?'checked':''; //Staff must explicitly check the box to change status..
+ if($ticket->isOpen()){?>
+ <input type="checkbox" name="ticket_status" value="Close" <?=$checked?> > Close on Reply
+ <?}?>
+ <input class="FormButton" type='submit' value='Post Reply' />
+ <input class="FormButton" type='reset' value='Reset' />
+ <input class="FormButton" type='button' value='Cancel' onClick='window.location.href="view.php"' />
</div>
</form>
</div>