# --
# AgentCompose.dtl - provides HTML form for AgentCompose 
# Copyright (C) 2002-2003 Martin Edenhofer <martin+code@otrs.org>
# --
# $Id: AgentForward.dtl,v 1.11 2003/04/08 21:36:23 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 forward form -->

<!-- This java script is just for nice to have funktions! -->
<script language="JavaScript" type="text/javascript">
<!--
function submit_forward()
{
    if (document.forward.To.value == "") {
        alert('$Text{"A message should have a To: recipient!"}');
        document.forward.To.focus();
        return false;
    }
    else if (document.forward.To.value.indexOf('@') == -1) {
        alert('$Text{"You need a email address (e. g. customer@example.com) in To:!"}');
        document.forward.To.focus();
        return false;
    }
    else if (document.forward.Subject.value == "") {
        alert('$Text{"A message should have a subject!"}');
        document.forward.Subject.focus();
        return false;
    }
    else {
        return true;
    }
}
//-->
</script>


<table border="0" width="100%" cellspacing="0" cellpadding="3" cols="1">
<tr> 
  <td align="left" class="table2"> 
  <b>$Env{"Box0"}$Text{"Forward article of ticket"}: $Data{"TicketNumber"}$Env{"Box1"}</b>
  </td>
</tr>
<tr> 
  <td align="left" valign="top" class="table1">

  <form action="$Env{"CGIHandle"}" method="post" name="forward">
  <input type="hidden" name="Action" value="AgentForward">
  <input type="hidden" name="Subaction" value="SendEmail">
  <input type="hidden" name="QueueID" value="$Data{"QueueID"}">
  <input type="hidden" name="TicketID" value="$Data{"TicketID"}">
  <input type="hidden" name="ArticleID" value="$Data{"ArticleID"}">
  <input type="hidden" name="NextScreen" value="$Data{"NextScreen"}">
  <input type="hidden" name="Email" value="$Data{"Email"}">
  <input type="hidden" name="InReplyTo" value="$Data{"InReplyTo"}">
  <table border="0">
    <tr>
      <td width="20%">$Text{"From"}:</td>
      <td width="80%">$Data{"SystemFromHTML"} <input type="hidden" name="From" value="$Data{"SystemFrom"}"></td>
    </tr>
    <tr>
      <td>$Text{"To"}:</td>
      <td><input type="text" name="To" value="" size="65"></td>
    </tr>
    <tr>
      <td>$Text{"Cc"}:</td>
      <td><input type="text" name="Cc" value="" size="65"></td>
    </tr>
    <tr>
      <td>$Text{"Subject"}:</td>
      <td><input type="text" name="Subject" value="$Data{"Subject"}" size="65"></td>
    </tr>
    <tr>
      <td valign="top">$Text{"Text"}:</td>
      <td>
<pre>
<textarea name="Body" rows="25" cols="$Config{"TextAreaEmailWindow"}" wrap="$Env{"BrowserWrap"}">


$Data{"Signature"}

---- $Text{"Forwarded message from"} $Data{"From"} ----

$Text{"Date"}: $Data{"Date"}
$Text{"From"}: $Data{"From"}
$Text{"To"}: $Data{"To"}
$Text{"Cc"}: $Data{"Cc"}
$Text{"Reply-To"}: $Data{"ReplyTo"}
$Text{"Subject"}: $Data{"Subject"} 
$Data{"Body"}
---- $Text{"End forwarded message"} ----
</textarea>
</pre>
      </td>
    </tr>
    <tr>
      <td>$Text{"Next ticket state"}:</td>
      <td>$Data{"NextStatesStrg"}</td>
    </tr>
    <tr>
      <td>$Text{"Article type"}:</td>
      <td>$Data{"ArticleTypesStrg"}</td>
    </tr>
    <tr>
      <td>$Text{"Time units"}$Text{"$Config{"TimeUnits"}"}:</td>
      <td><input type="text" name="TimeUnits" value="" size="3"></td>
    </tr>
  </table>
  <br>
  <input class="button" type="submit" value="$Text{"Send mail!"}" onclick="return submit_forward();">
  </form>

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