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

[%############################################################################%]
[%# Template Initialization #%]
[%############################################################################%]

[% PROCESS global/variables.none.tmpl %]

[%############################################################################%]
[%# Page Header #%]
[%############################################################################%]

[% PROCESS global/header.html.tmpl
   style_urls = ['testopia.css'] %] 

[% IF NOT deleted %]
[% IF caseruns %]
  You are about to permanently remove [% caseruncount %] case(s) from this test run.
[% ELSE %]
  You are about to permanently remove this test case from this run with all its history. 
[% END %]
<br>
[% IF bugcount %]
This case has <a href="buglist.cgi?bug_id=[% caserun.bug_list FILTER none %]">[% bugcount FILTER none %]&nbsp;[% terms.bugs %]</a> linked to it.<br/>
[% END %]
<span style="font-size:12pt; font-weight:bold; color:#cc0000;">Warning: This action cannot be undone!</span>
<br>
<br>
<form action="[% form_action FILTER none %]" method="POST">
  <input type="hidden" name="run_id" value="[% run_id FILTER none %]" />
  <input type="hidden" name="action" value="do_delete" />
  [% IF caseruns %]
    [% FOREACH c = caseruns %]
      <input type="hidden" name="caserun_id" value="[% c.id FILTER none %]" />
    [% END %]    
  [% ELSE %]
  <p>
  <input type="checkbox" style="border: none" name="single" id="single" value="1" /><label for="single">Only remove this case-run for environment <b>[% caserun.environment.name FILTER html %]</b> and build <b>[% caserun.build.name FILTER html %]</b></label><br/>
  </p>
  
    <input type="hidden" name="caserun_id" value="[% caserun.id FILTER none %]" />
  [% END %]
  <input type="submit" value="Remove" />
  <a href="tr_show_run.cgi?run_id=[% caserun.run.id FILTER none %]">Cancel</a>
</form>


[% ELSE %]

Test case(s) removed.
  [% IF run_id %]
  <a href="tr_show_run.cgi?run_id=[% run_id FILTER none %]">Go back to test run [% run_id FILTER none %]</a>
  [% END %]
[% END %]

[% PROCESS global/footer.html.tmpl %]
