# --
# AgentTicketBounce.dtl - provides HTML form for bounce mask
# Copyright (C) 2001-2008 OTRS AG, http://otrs.org/
# --
# $Id: AgentTicketBounce.dtl,v 1.11 2008/05/02 13:21:40 rk 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-2.0.txt.
# --

<!-- start bounce form -->

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

<table border="0" width="100%" cellspacing="0" cellpadding="3">
  <tr>
    <td class="contenthead">
      $Env{"Box0"}$Text{"Bounce ticket"}: $Data{"TicketNumber"}$Env{"Box1"}
    </td>
  </tr>
  <tr>
    <td class="menu">
<!-- dtl:block:TicketBack -->
      <a href="$Env{"Baselink"}$Env{"LastScreenView"}" onmouseover="window.status='$JSText{"Back"}'; return true;" onmouseout="window.status='';" class="menuitem">$Text{"Back"}</a>
<!-- dtl:block:TicketBack -->
<!-- dtl:block:TicketLocked -->
      <img border="0" src="$Env{"Images"}warning.png" alt="$Text{"Info"}">: <font color="red">$Text{"Ticket locked!"}</font> (<a href="$Env{"Baselink"}Action=AgentTicketLock&Subaction=Unlock&TicketID=$Data{"TicketID"}" onmouseover="window.status='$JSText{"Ticket unlock!"}'; return true;" onmouseout="window.status='';">$Text{"Ticket unlock!"}</a>)
<!-- dtl:block:TicketLocked -->
    </td>
  </tr>
  <tr>
    <td class="mainbody">
      <br/>
      <form action="$Env{"CGIHandle"}" method="post" name="bounce">
        <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="ArticleID" value="$Data{"ArticleID"}"/>
        <input type="hidden" name="NextScreen" value="$Data{"NextScreen"}"/>
        <table border="0" width="800" align="center" cellspacing="0" cellpadding="4">
          <tr>
            <td colspan="2" class="contenthead">$Text{"Options"}</td>
          </tr>
          <tr>
            <td class="contentbody">
              <table border="0" width="100%">
                <tr>
                  <td width="20%" class="contentkey">$Text{"Bounce to"}:</td>
                  <td width="80%" class="contentvalue"><input type="text" name="BounceTo" value="" size="60"/></td>
                </tr>
                <tr>
                  <td class="contentkey">$Text{"Next ticket state"}:</td>
                  <td class="contentvalue">$Data{"NextStatesStrg"}</td>
                </tr>
                <tr>
                  <td class="contentkey">$Text{"Inform sender"}:</td>
                  <td class="contentvalue"><input type="checkbox" name="InformSender" value="1"/></td>
                </tr>
                <tr>
                  <td class="contentkey">$Text{"From"}:</td>
                  <td class="contentvalue">$QData{"From"}</td>
                </tr>
                <tr>
                  <td class="contentkey">$Text{"To"}:</td>
                  <td class="contentvalue"><input type="text" name="To" value="$QData{"To"}" size="60"/></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="$Config{"Ticket::Frontend::TextAreaEmail"}" wrap="$Env{"BrowserWrap"}">
$Data{"Salutation"}

$Text{"$Config{"Ticket::Frontend::BounceText"}"}

$Data{"Signature"}

</textarea>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td class="contentfooter">
              <input class="button" accesskey="g" type="submit" value="$Text{"Send mail!"}" onclick="return submit_compose();"/>
            </td>
          </tr>
        </table>
      </form>
      <br/>
    </td>
  </tr>
</table>
<!-- end bounce form -->
