# --
# NoteForm.dtl - provides HTML form for note mask
# Copyright (C) 2001-2003 Martin Edenhofer <martin+code@otrs.org>
# --
# $Id: AgentMove.dtl,v 1.7 2003/12/08 00:10:20 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 -->

<script language="JavaScript" type="text/javascript">
<!--
function submit_compose()
{
alert(start_elements);
    if (document.compose.DestQueueID.value == "") {
        alert('$Text{"Queue ID"}');
        document.compose.DestQueueID.focus();
        return false;
    } 
}
//-->
</script>
<script language="JavaScript" type="text/javascript">
<!--

function change_selected(sel)
{ 
   start_elements = (sel + 5);
   if (document.compose.elements[0].name == "$Config{"SessionName"}") {
       start_elements = start_elements + 1;
   }
   if (!document.compose.elements[start_elements].checked) {
        document.compose.elements[start_elements].checked = true;
   }
# just for debug!
#alert(start_elements);
#alert(document.compose.elements[start_elements].name)
#alert(document.compose.elements[start_elements].checked)
}

function submit_compose()
{
    if (document.compose.DestQueueID.value == "") {
        alert('$Text{"Queue ID"}');
        document.compose.DestQueueID.focus();
        return false;
    } 
}
//-->
</script>

<table border="0" width="100%" cellspacing="0" cellpadding="3" cols="1">
<tr> 
  <td align="left" class="table2"> 
    <b>$Env{"Box0"}$Text{"Move Ticket"}: $Data{"TicketNumber"}$Env{"Box1"}</b>
  </td>
</tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="3" cols="2">
#<tr>
#  <td align="left" colspan="2" class="table2">
#    <a href="$Env{"Baselink"}$Env{"LastScreen"}" onmouseover="window.status='$Text{"Back"}'; return true;" onmouseout="window.status='';" class="menuitem">$Text{"Back"}</a>
#  </td>
#</tr>
<tr>
  <td align="left" valign="top" colspan="2" class="table1">

<p>
#$Data{"TicketUnlock"}
  <form action="$Env{"CGIHandle"}" method="get" name="compose">
  <input type="hidden" name="Action" value="AgentMove">
  <input type="hidden" name="TicketID" value="$Data{"TicketID"}">
  <input type="hidden" name="TicketUnlock" value="$Data{"TicketUnlock"}">
#  <input type="hidden" name="DestQueueID" value="">
  <input type="hidden" name="ExpandQueueUsers" value="">
  <input type="hidden" name="AllUsers" value="0">
 
  <table border="0" width="100%">
  <tr valign="top">
    <td>$Text{"New Queue"}:</td>
    <td></td>
    <td>$Data{"MoveQueuesStrg"} $Data{"LatestQueue"}</td>
  </tr>
  <tr valign="top">
    <td width="18%">$Text{"New Owner"}:</td>
    <td width="2%"><input type="radio" name="UserSelection" value="New" checked="checked"></td>
    <td width="80%">$Data{"OwnerStrg"} $Env{"Box0"}<a href="" onclick="document.compose.ExpandQueueUsers.value='3'; document.compose.AllUsers.value='1'; document.compose.submit(); return false;" onmouseout="window.status='';" onmouseover="window.status='$Text{"All Agents"}'; return true;">$Text{"All"}</a>$Env{"Box1"}</td>
  </tr>
  <tr>
    <td>$Text{"Previous Owner"}:</td>
    <td><input type="radio" name="UserSelection" value="Old"></td>
    <td>$Data{"OldUserStrg"}</td>
  </tr>
  <tr>
    <td valign="top">$Text{"Note"}:</td>
    <td></td>
    <td>
<textarea name="Comment" rows="8" cols="$Config{"TextAreaNoteWindow"}" wrap="$Env{"BrowserWrap"}">$Data{"Comment"}
</textarea>
    </td>
  </tr>

# --
# use ticket is move  
# --
<dtl if ($Config{"MoveSetState"} eq "1") { $Data{"NextStatesString"} = "<tr><td width="20%">$Text{"Next ticket state"}:</td><td></td><td width="80%">$Data{"NextStatesStrg"}</td></tr>"; }>
    $Data{"NextStatesString"}
#
  </table>
  <br>
  <input class="button" type="submit" value="$Text{"Move"}" onclick="return submit_compose();">

  </form>
</p>

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