[%# 1.0@bugzilla.org %]
[%# The contents of this file are subject to the Mozilla Public
  # License Version 1.1 (the "License"); you may not use this file
  # except in compliance with the License. You may obtain a copy of
  # the License at http://www.mozilla.org/MPL/
  #
  # Software distributed under the License is distributed on an "AS
  # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  # implied. See the License for the specific language governing
  # rights and limitations under the License.
  #
  # The Original Code is the Bugzilla Test Runner System.
  #
  # The Initial Developer of the Original Code is Maciej Maczynski.
  # Portions created by Maciej Maczynski are Copyright (C) 2001
  # Maciej Maczynski. All Rights Reserved.
  #
  # Contributor(s): Ed Fuentetaja <efuentetaja@acm.org>
  #                 Greg Hendricks <ghendricks@novell.com>
  #                 Joel Smith <jsmith@novell.com>
  #%]

[% PROCESS testopia/blocks.html.tmpl %]

<form method="POST" action="tr_process_run.cgi" id="run_clone_frm">
<input type="hidden" name="action" value="clone" /> 
<input type="hidden" name="ctype" value="json" /> 
<input type="hidden" name="run_id" value="[% run.id FILTER none %]" />
<input type="hidden" name="case_list" value="[% case_list FILTER html %]" />

<table border="0" cellspacing="4">
  <tr>
    <td>New run summary:</td>
    <td><input size="30" name="summary"
      value="Copy of [% run.summary FILTER html %]" /></td>
  </tr>

  <tr>
    <td>Clone to plan:</td>
    <td>
      [% PROCESS select sel = { name => 'plan_id', 
                                list => run.plan.product.plans 
                                accesskey => 'p' 
                                default => run.plan.id} 
      %]
    </td>
  </tr>

  <tr>
    <td>Product version:</td>
    <td>[% PROCESS select sel = { name => 'product_version', 
                                  list => run.plan.product.versions,
                                  accesskey => 'v' 
                                  default => run.product_version } %]</td>
  </tr>

  <tr>
    <td>Build:</td>
    <td>[% PROCESS select sel = { name => 'build', 
                                  list => run.plan.product.builds 
                                  accesskey => 'b' 
                                  default => run.build.id } %]</td>
  </tr>

  <tr>
    <td>Maintain Run Manager:</td>
    <td><input type="radio" style="border: none" name="keepauthor" value="1" checked />Yes <input
      type="radio" style="border: none" name="keepauthor" value="0" />No, make me the manager of the new run.</td>
  </tr>

  <tr>
    <td>Copy tags:</td>
    <td><input type="radio" style="border: none" name="copy_tags" value="1" checked />Yes <input
      type="radio" style="border: none" name="copy_tags" value="0" />No</td>
  </tr>
  <tr>
    <td>Copy test case indexes:</td>
    <td><input type="radio" style="border: none" name="copy_sortkey" value="1" checked />Yes <input
      type="radio" style="border: none" name="copy_sortkey" value="0" />No</td>
  </tr>
[% IF NOT case_list %]
  <tr>
    <td>Copy test cases:</td>
    <td><input type="radio" style="border: none" name="copy_test_cases" value="1" checked />Yes
    <input type="radio" style="border: none" name="copy_test_cases" value="0" />No</td>
  </tr>

  <tr>
    <td>With status:</td>
    <td>
      [% PROCESS select sel = { name => 'status', 
                                list => caserun.get_status_list
                                accesskey => 's' 
                                mult => 1 
                                default => 'all' } %]
    </td>
  </tr>
[% END %]
</table>

</form>
