[%# 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>
  #%]

[%# INTERFACE:
  #  plan: object - The test plan to clone.
  #%]

<form method="POST" action="tr_process_plan.cgi" id="plan_clone_frm">
  <input type="hidden"  name="action" value="clone"> 
  <input type="hidden" name="plan_id" value="[% plan.id FILTER none %]">

<table border="0" cellspacing="4">
  <tr>
    <td valign="TOP" align="RIGHT">New plan name:</td>
    <td><input size="30" name="plan_name"
      value="Copy of [% plan.name FILTER html %]" /></td>
  </tr>
  
  <tr>
    <td valign="TOP" align="RIGHT">Clone to product:</td>
    <td>
      [% PROCESS select sel = { name => 'product_id', 
                                list => user.get_selectable_products 
                                accesskey => 'p' 
                                default => plan.product_id
                                events    => "onChange='getProdVers(this.value)'"}  
      %]
    </td>
  </tr>
  
  <tr>
    <td valign="TOP" align="RIGHT">Product version:</td>
    <td>[% PROCESS select sel = { name => 'prod_version', 
                                  list => plan.product.versions
                                  accesskey => 'v' 
                                  default => plan.product_version }
         %]
    </td>
  </tr>

  <tr>
    <td valign="TOP" align="RIGHT">Copy plan attachments:</td>
    <td><input type="radio" style="border: none" name="copy_attachments" value="1" />Yes <input
      type="radio" style="border: none" name="copy_attachments" value="0" checked="checked" />No</td>
  </tr>

  <tr>
    <td valign="TOP" align="RIGHT">Copy plan document:</td>
    <td><input type="radio" style="border: none" name="copy_doc" value="1" checked />Yes <input
      type="radio" style="border: none" name="copy_doc" value="0" />No</td>
  </tr>

  <tr>
    <td valign="TOP" align="RIGHT">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 valign="TOP" align="RIGHT">Copy permissions:</td>
    <td><input type="radio" style="border: none" name="copy_perms" value="1" checked />Yes <input
      type="radio" style="border: none" name="copy_perms" value="0" />No</td>
  </tr>

  <tr>
    <td valign="TOP" align="RIGHT">Maintain Plan and Case Authors:</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 author of the new cases.</td>
  </tr>

  <tr>
    <td valign="TOP" align="RIGHT">Copy Test Runs with their Cases?:</td>
    <td><input type="radio" style="border: none" name="copy_runs" value="1" checked />Yes <input
      type="radio" style="border: none" name="copy_runs" value="0" />No</td>
  </tr>

  <tr>
    <td valign="TOP" align="RIGHT">Copy/Link test cases:</td>
    <td>
    <input type="radio" style="border: none" name="copy_cases" value="2" checked />Copy
    <input type="radio" style="border: none" name="copy_cases" value="1" />Link
    <input type="radio" style="border: none" name="copy_cases" value="0" />No</td>
  </tr>

  <tr>
    <td valign="TOP" align="RIGHT">Copy/Link test cases from selected
    categories only:</td>
    <td>
      [% PROCESS select sel = { name => 'clone_categories', 
                                list => plan.get_used_categories 
                                accesskey => 'c' 
                                mult => 1 
                                elements => 5
                                default => 'all'} 
      %]
    </td>
  </tr>
</table>
</form>

