# --
# CustomerMessageNew.dtl - provides HTML form for customer message
# Copyright (C) 2001-2005 Martin Edenhofer <martin+code@otrs.org>
# --
# $Id: CustomerTicketMessageNew.dtl,v 1.3 2005/09/11 11:49:52 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="1">
<tr>
  <td class="mainhead">
    $Env{"Box0"}$Text{"new ticket"}$Env{"Box1"}
  </td>
</tr>
<tr>
  <td class="mainbody">

  <br>

  <table border="0" width="650" align="center" cellspacing="0" cellpadding="4">
    <tr>
      <td colspan="2" class="contenthead">$Text{"Options"}</td>
    </tr>
    <tr>
    <td class="contentbody">

      <form action="$Env{"CGIHandle"}" method="post" name="compose" enctype="multipart/form-data">
      <input type="hidden" name="Action" value="$Env{"Action"}">
      <input type="hidden" name="Subaction" value="StoreNew">
      <input type="hidden" name="TicketID" value="$Data{"TicketID"}">
      <table border="0">
        <tr>
          <td width="20%" class="contentkey">$Text{"To"}:</td>
          <td width="80%" class="contentvalue">$Data{"ToStrg"}</td>
        </tr>
        <tr>
          <td class="contentkey">$Text{"Subject"}:</td>
          <td class="contentvalue"><input type="text" name="Subject" value="$QData{"Subject"}" size="60"></td>
        </tr>
        <tr>
          <td class="contentkey">$Text{"Text"}:</td>
          <td class="contentvalue"><textarea name="Body" rows="15" cols="60" wrap="$Env{"BrowserWrap"}">$QData{"Body"}</textarea>
          </td>
        </tr>
        <tr>
          <td class="contentkey">$Text{"Attachment"}:</td>
          <td class="contentvalue"><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{"CustomerPriority"} ne "0") { $Data{"PriorityString"} = "<tr><td class="contentkey">$Text{"Priority"}:</td><td class="contentvalue"> $Data{"PriorityStrg"}</td></tr>"; }>
  $Data{"PriorityString"}
#       <tr>
#         <td class="contentkey">$Data{"TicketFreeKeyField1"}:</td>
#         <td class="contentvalue">$Data{"TicketFreeTextField1"}</td>
#       </tr>
#       <tr>
#         <td class="contentkey">$Data{"TicketFreeKeyField2"}:</td>
#         <td class="contentvalue">$Data{"TicketFreeTextField2"}</td>
#       </tr>
#       <tr>
#         <td class="contentkey">$Data{"TicketFreeKeyField3"}:</td>
#         <td class="contentvalue">$Data{"TicketFreeTextField3"}</td>
#       </tr>
#       <tr>
#         <td class="contentkey">$Data{"TicketFreeKeyField4"}:</td>
#         <td class="contentvalue">$Data{"TicketFreeTextField4"}</td>
#       </tr>
#       <tr>
#         <td class="contentkey">$Text{"$Config{"TicketFreeTimeKey1"}"}:</td>
#         <td class="contentvalue">$Data{"TicketFreeTime1"}</td>
#       </tr>
#       <tr>
#         <td class="contentkey">$Text{"$Config{"TicketFreeTimeKey2"}"}:</td>
#         <td class="contentvalue">$Data{"TicketFreeTime2"}</td>
#       </tr>
      </table>

      </td>
    </tr>
    <tr>
      <td class="contentfooter">
        <input class="button" accesskey="g" type="submit" value="$Text{"submit"}" onclick="return submit_compose();">
      </td>
    </tr>
  </table>

  </form>

  <br>

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