# --
# CustomerMessage.dtl - provides HTML form for customer message
# Copyright (C) 2001-2005 Martin Edenhofer <martin+code@otrs.org>
# --
# $Id: CustomerTicketMessage.dtl,v 1.1 2005/03/27 11:37:36 martin Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (GPL). If you
# did not receive this file, see http://www.gnu.org/licenses/gpl.txt.
# --
<!-- start form -->

<!-- This java script is just for nice to have funktions! -->
<script language="JavaScript" type="text/javascript">
<!--
function submit_compose()
{
    if (document.compose.Subject.value == "") {
        alert('$Text{"A message should have a subject!"}');
        document.compose.Subject.focus();
        return false;
    }
    else if (document.compose.Body.value == "") {
        alert('$Text{"A message should have a body!"}');
        document.compose.Body.focus();
        return false;
    }
    else {
        return true;
    }
}
//-->
</script>

<table border="0" width="100%" cellspacing="0" cellpadding="3" cols="2">
<tr>
  <td class="mainhead">
    $Env{"Box0"}$Text{"Follow up"}: $Data{"TicketNumber"}$Env{"Box1"}
  </td>
</tr>
<tr>
  <td class="mainbody">

<p>

<form action="$Env{"CGIHandle"}" method="post" enctype="multipart/form-data" name="compose">
<input type="hidden" name="Action" value="$Env{"Action"}">
<input type="hidden" name="Subaction" value="Store">
<input type="hidden" name="QueueID" value="$Data{"QueueID"}">
<input type="hidden" name="TicketID" value="$Data{"TicketID"}">
<input type="hidden" name="NextScreen" value="$Data{"NextScreen"}">
  <table border="0" width="100%">
  <tr>
    <td width="15%">$Text{"Subject"}:</td>
    <td width="85%"><input type="text" name="Subject" value="$QData{"Subject"}" size="60"></td>
  </tr>
  <tr>
    <td valign="top">$Text{"Text"}:</td><td>
<textarea name="Body" rows="15" cols="60" wrap="$Env{"BrowserWrap"}">$QData{"Body"}</textarea>
    </td>
  </tr>
  <tr>
    <td>$Text{"Attachment"}:</td><td><input name="file_upload" type="file" size="40" class="fixed">&nbsp;<a name="attachment"></td>
  </tr>
# should the customer user change the ticket state!
<dtl if ($Config{"CustomerPanelNextComposeState"} ne "0") { $Data{"NextStateString"} = "<tr><td>$Text{"Next state"}:</td><td> $Data{"NextStatesStrg"}</td></tr>"; }>
  $Data{"NextStateString"}
#
  </table>
<br>
<input class="button" type="submit" value="$Text{"submit"}" onclick="return submit_compose();">
</form>

</p>

  </td>
</tr>
</table>
<!-- end form -->
