[%# 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 Bug Tracking System.
  #
  # The Initial Developer of the Original Code is Mozilla Corporation.
  # Portions created by Mozilla are Copyright (C) 2008 Mozilla
  # Corporation. All Rights Reserved.
  #
  # Contributor(s): Mark Smith <mark@mozilla.com>
  #                 Reed Loden <reed@mozilla.com>
  #%]

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

[% inline_style = BLOCK %]
.field_label {
  width: 170px;
  margin-top: 10px;
}
label.required:before {
  content: "* ";
  color: var(--required-label-color);
}
.required_star {
  color: var(--required-label-color);
}
[% END %]

[% PROCESS global/header.html.tmpl
   title = "Mozilla Corporation Legal Requests"
   generate_api_token = 1
   style = inline_style
   style_urls = [ 'skins/standard/attachment.css',
                  'skins/standard/create_bug.css' ]
   javascript_urls = [ 'js/attachment.js', 'js/field.js' ]
%]

[% IF NOT user.in_group("mozilla-employee-confidential")
   AND NOT user.in_group("mozilla-messaging-confidential")
   AND NOT user.in_group("mozilla-foundation-confidential") %]
  <p>Sorry, you do not have access to this page.</p>
  [% PROCESS global/footer.html.tmpl %]
  [% RETURN %]
[% END %]

[% PROCESS 'bug/create/user-message.html.tmpl' no_bug_guidelines = 1, no_guided_bug_link = 1 %]

[%
  hide_components = [
    'Firefox Distribution or Other Partner Agreement',
    'Independent Contractor Agreement',
    'Name Clearance (Trademark Search)',
    'NDA',
    'Search',
    'Vendor/Services'
  ]
%]

<h2>Mozilla Legal</h2>

<p>All submissions, and information provided in response to this request, are confidential and
  subject to the Attorney-Client Privilege and Work Product Doctrine.</p>

<p>Legal [% terms.bugs %] are only available to the reporter, the cc list, and members of the legal team.
  This is to maintain confidentiality and privilege.  Non-employees should not be included on legal [% terms.bugs %].

<p>[ <span class="required_star">*</span> Required Field ]</p>

<form method="post" action="[% basepath FILTER none %]post_bug.cgi" id="legalRequestForm" enctype="multipart/form-data">
  <input type="hidden" name="filed_via" value="custom_form">
  <input type="hidden" name="product" value="Legal">
  <input type="hidden" name="rep_platform" value="All">
  <input type="hidden" name="op_sys" value="Other">
  <input type="hidden" name="version" value="unspecified">
  <input type="hidden" name="bug_type" value="task">
  <input type="hidden" name="format" value="legal">
  <input type="hidden" name="contenttypemethod" value="autodetect">
  <input type="hidden" name="token" value="[% token FILTER html %]">
  [% IF user.in_group('canconfirm') %]
    <input type="hidden" name="bug_status" value="NEW">
  [% END %]

  <table>
  <tr>
    <th class="field_label">
      <label for="component" class="required">Request Type:</label>
    </th>
    <td>
      <select id="component" name="component" required="required">
        <option value="">Select One</option>
        [%- FOREACH comp = product.components %]
          [% NEXT IF NOT comp.is_active %]
          [% NEXT IF hide_components.contains(comp.name) %]
          <option value="[% comp.name FILTER html %]"
            [% ' selected="selected"' IF comp.name == "General" %]>
            [% comp.name FILTER html -%]
          </option>
        [%- END %]
      </select>
    </td>
  </tr>

  <tr>
    <th class="field_label">
      <label for="business_unit" class="required">Business Unit:</label>
    </th>
    <td>
      <select id="business_unit" name="business_unit" required="required">
        <option value="">Select One</option>
        <option value="BD/Legal/Policy">BD/Legal/Policy</option>
        <option value="Connected Devices">Connected Devices</option>
        <option value="Emerging Technologies">Emerging Technologies</option>
        <option value="Finance &amp; Accounting">Finance &amp; Accounting</option>
        <option value="Firefox">Firefox</option>
        <option value="Foundation">Foundation</option>
        <option value="Innovation">Innovation</option>
        <option value="Marketing">Marketing</option>
        <option value="Participation">Participation</option>
        <option value="Pocket">Pocket</option>
        <option value="Strategic Operations">Strategic Operations</option>
        <option value="Other">Other</option>
      </select>
    </td>
  </tr>

  <tr>
    <th class="field_label">
      <label for="short_desc" class="required">Summary:</label>
    </th>
    <td>
      <input type="text" id="short_desc" name="short_desc" size="60" required="required">
    </td>
  </tr>

  <tr>
    <th class="field_label" valign="top">
      <label for="comment">Description:</label>
    </th>
    <td>
      <textarea id="comment" name="comment" rows="10" cols="80"></textarea>
    </td>
  </tr>

  <tr>
    <th class="field_label">
      <label for="cc">Cc:</label>
    </th>
    <td>
      [% INCLUDE global/userselect.html.tmpl
         id       => "cc"
         name     => "cc"
         size     => 60
         classes  => ["bz_userfield"]
         multiple => 5
      %]
    </td>
  </tr>

  <tr>
    <th class="field_label">
      <label for="important_dates">Important Dates:</label>
    </th>
    <td>
      <input type="text" id="important_dates" name="important_dates" size="60">
    </td>
  </tr>

  <tr>
    <th class="field_label">
      <label for="bug_file_loc">URL:</label>
    </th>
    <td>
      <input type="text" name="bug_file_loc" id="bug_file_loc" size="60" placeholder="https://">
    </td>
  </tr>

  [% IF user.in_group('editbugs', product.id) %]
    <tr>
      <th class="field_label">
        <label for="dependson">Depends on:</label>
      </th>
      <td>
        <input type="text" id="dependson" name="dependson" size="30">
      </td>
    </tr>

    </tr>
      <th class="field_label">
        <label for="blocked">Blocks:</label>
      </th>
      <td>
        <input type="text" id="blocked" name="blocked" size="30">
      </td>
    </tr>
  [% END %]

  <tr>
    <td></td>
    <td>
      Please attach any additional information needed for this request.
    <td>
  </tr>

  <tr>
    <th class="field_label">
      <label for="description">Attachment Description</label>
    </th>
    <td>
      <input type="text" name="description" id="description" size="60">
    </td>
  </tr>

  <tr>
    <th class="field_label">
      <label for="data">Attachment Filename:</label>
    </th>
    <td>
      <input type="file" id="data" name="data" size="60">
    </td>
  </tr>

  <tr>
    <td></td>
    <td><input type="submit" id="commit" value="Submit Request"></td>
  </tr>
</table>

</form>

<p>Thanks for contacting us. You will be notified by email of any progress made in resolving your request.</p>

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