[%# 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 %]
p {
   max-width: 40%;
}
label.required:before {
  content: "* ";
  color: var(--required-label-color);
}
.required_star {
  color: var(--required-label-color);
}
[% END %]

[% inline_javascript = BLOCK %]
function jobDescToggle(what) {
  switch (what) {
  case 'text':
    $('#jobDescText').show();
    $('#jobDescFile').hide();
    break;

  case 'file':
    $('#jobDescText').hide();
    $('#jobDescFile').show();
    break;
  }
}
[% END %]

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

[% IF user.in_group("mozilla-employee-confidential")
   OR user.in_group("mozilla-messaging-confidential")
   OR user.in_group("mozilla-foundation-confidential") %]
  <h1>Recruiting</h1>

  <p>
    Recruiting [% terms.Bugs %] are visible only to the Reporter, members of the People
    Team, and those on the CC list. Please do not add non-employees to the CC list.
    This form is to request a new open requisition only, and is not for
    communication about existing open requisitions in Greenhouse.
  </p>

  <form method="post" action="[% basepath FILTER none %]post_bug.cgi" id="recruitingForm" enctype="multipart/form-data">
    <input type="hidden" name="filed_via" value="custom_form">
    <input type="hidden" name="product" value="Recruiting">
    <input type="hidden" name="component" value="General">
    <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="recruiting">
    <input type="hidden" name="created-format" value="recruiting">
    <input type="hidden" name="token" value="[% token FILTER html %]">
    <input type="hidden" id="description" name="description" value="Job Description">
    <input type="hidden" name="contenttypemethod" value="autodetect">
    [% IF user.in_group('canconfirm') %]
      <input type="hidden" name="bug_status" value="NEW">
    [% END %]

    <table>
      <tr>
        <th align="right" valign="top" width="170">
          <label class="required" for="short_desc">Position Posting Title:</label>
        </th>
        <td>
          <input required name="short_desc" id="short_desc" size="60" value="[% short_desc FILTER html %]">
        </td>
      </tr>

      <tr>
        <th align="right">
          <label class="required" for="cost_center">Cost Center:</label>
        </th>
        <td>
          [% PROCESS "bug/create/cost-centers.none.tmpl" %]
          <select required id="cost_center" name="cost_center">
            <option value="">Select..</option>
            [% FOREACH cost_center IN cost_centers %]
              <option value="[% cost_center FILTER html %]">[% cost_center FILTER html %]</option>
            [% END %]
          </select>
        </td>
      </tr>

      <tr>
        <th align="right" valign="top">
          <label class="required" for="hiring_manager_name">Hiring Manager Name:</label>
        </th>
        <td>
          <input required name="hiring_manager_name" id="hiring_manager_name" size="60">
        </td>
      </tr>

      <tr>
        <th align="right" valign="top">
          <label class="required" for="hiring_manager_workday_title">Hiring Manager Workday Title:</label>
        </th>
        <td>
          <input required name="hiring_manager_workday_title" id="hiring_manager_workday_title" size="60">
        </td>
      </tr>

      <tr>
        <th align="right" valign="top">
          <label class="required" for="director_authority">Director Authority:</label>
        </th>
        <td>
          <input required name="director_authority" id="director_authority" size="60">
        </td>
      </tr>

      <tr>
        <th align="right">
          <label class="required" for="vp_authority">VP Authority</label>
        </th>
        <td>
          <select required id="vp_authority" name="vp_authority">
            <option value="">Select..</option>
            [% INCLUDE "bug/create/vp-authority.html.tmpl" %]
          </select>
        </td>
      </tr>

      <tr>
        <th align="right">
          <label class="required" for="hrbp_name">HRBP Name</label>
        </th>
        <td>
          <select required id="hrbp_name" name="hrbp_name">
            <option value="">Select...</option>
            <option value="Tyler Haugen">Tyler Haugen</option>
            <option value="Josh Kruse">Josh Kruse</option>
            <option value="Matt Frassica">Matt Frassica</option>
            <option value="Huma Shah">Huma Shah</option>
          </select>
        </td>
      </tr>

      <tr>
        <th align="right">
          <label class="required" for="employment_type">Employment Type</label>
        </th>
        <td>
          <select required id="employment_type" name="employment_type">
            <option value="">Select...</option>
            <option value="Full-time">Full-time</option>
            <option value="Part-time">Part-time</option>
            <option value="Intern">Intern</option>
            <option value="Contract">Contract</option>
            <option value="Temporary">Temporary</option>
            <option value="Student Worker">Student Worker</option>
          </select>
        </td>
      </tr>

      <tr>
        <th align="right" valign="top">
          <label class="required" for="desired_location">Desired Locations</label>
        </th>
        <td>
          <select required id="desired_location" name="desired_location" multiple="5">
            <option value="any">Any Location</option>
            <option value="remote">Remote</option>
            <option value="europe">Europe</option>
            <option value="latinamerica">Latin America</option>
            <option value="northamerica">North America</option>
            <option value="bayarea">Bay Area</option>
            <option value="berlin">Berlin</option>
            <option value="boston">Boston</option>
            <option value="london">London</option>
            <option value="mountainview">Mountain View</option>
            <option value="newzealand">New Zealand</option>
            <option value="paris">Paris</option>
            <option value="portland">Portland</option>
            <option value="sanfrancisco">San Francisco</option>
            <option value="toronto">Toronto</option>
            <option value="vancouver">Vancouver</option>
          </select>
        </td>
      </tr>

      <tr>
        <th align="right">
          <label class="required" for="job_level">Job Level</label></th>
        <td>
          <select required id="job_level" name="job_level">
            <option value="">Select...</option>
            <option value="P1">P1</option>
            <option value="P2">P2</option>
            <option value="P3 - Senior">P3 - Senior</option>
            <option value="P4 - Staff">P4 - Staff</option>
            <option value="P5 - Sr Staff">P5 - Sr Staff</option>
            <option value="P6 - Principal">P6 - Principal</option>
            <option value="P7 - Sr Principal">P7 - Sr Principal</option>
            <option value="P8 - Fellow">P8 - Fellow</option>
            <option value="M1">M1</option>
            <option value="M2 - Supervisor">M2 - Supervisor</option>
            <option value="M3 - Manager">M3 - Manager</option>
            <option value="M4 - Sr Manager">M4 - Sr Manager</option>
            <option value="M5 - Director">M5 - Director</option>
            <option value="M6 - Sr Director">M6 - Sr Director</option>
            <option value="E1 - VP">E1 - VP</option>
            <option value="E2 - SVP/C-Level">E2 - SVP/C-Level</option>
            <option value="E3 - CEO/President">E3 - CEO/President</option>
            <option value="S1">S1</option>
            <option value="S2">S2</option>
            <option value="S3 - Senior">S3 - Senior</option>
            <option value="S4 - Staff">S4 - Staff</option>
            <option value="S5 - Sr Staff">S5 - Sr Staff</option>
            <option value="Steering Committee Member">Steering Committee Member</option>
            <option value="Seasonal">Seasonal</option>
            <option value="Seasonal Hourly">Seasonal Hourly</option>
            <option value="Intern">Intern</option>
            <option value="Student Worker">Student Worker</option>
            <option value="Mozilla Foundation">Mozilla Foundation</option>
          </select>
        </td>
      </tr>

      <tr>
        <th align="right" valign="top">
          <label class="required" for="comp_grade">Comp Grade:</label>
        </th>
        <td>
          <select required name="comp_grade" id="comp_grade">
            <option value="">Select...</option>
            <option value="Grade C">Grade C</option>
            <option value="Grade D">Grade D</option>
            <option value="Grade E">Grade E</option>
            <option value="Grade F">Grade F</option>
            <option value="Grade G">Grade G</option>
            <option value="Grade H">Grade H</option>
            <option value="Grade I">Grade I</option>
            <option value="Grade J">Grade J</option>
            <option value="Grade K">Grade K</option>
            <option value="Grade L">Grade L</option>
            <option value="Grade M">Grade M</option>
            <option value="Grade N">Grade N</option>
            <option value="Grade O">Grade O</option>
            <option value="Grade P">Grade P</option>
            <option value="Grade Q">Grade Q</option>
            <option value="Grade R">Grade R</option>
            <option value="Grade S">Grade S</option>
          </select>
        </td>
      </tr>

      <tr>
        <th align="right" valign="top">
          <label class="required" for="new_or_backfill">Is this new headcount or backfill?</label>
        </th>
        <td>
          <select required name="new_or_backfill" id="new_or_backfill">
            <option value="">Select...</option>
            <option value="new">New</option>
            <option value="backfill">Backfill</option>
          </select>
        </td>
      </tr>

      <tr>
        <th align="right" valign="top">
          <label class="required" for="backfill_name">
            Name of Backfill
          </label>
        </th>
        <td>
          <input required name="backfill_name" id="backfill_name" size="60">
        </td>
      </tr>

      <tr>
        <th align="right" valign="top">
          <label class="required" for="multiple">
            Are you hiring multiple of this position this year?
          </label>
        </th>
        <td>
          <select required name="multiple" id="multiple">
            <option value="">Select...</option>
            <option value="Yes">Yes</option>
            <option value="No">No</option>
          </select>
        </td>
      </tr>

      <tr>
        <th align="right" valign="top">
          <label class="required" for="job_family">
            Please include Job Family<br>(if you don't know please consult your HRBP)
          </label>
        </th>
        <td>
          <input required name="job_family" id="job_family" size="60">
        </td>
      </tr>

      <tr id="jobDescFile">
        <th align="right" valign="top">
          <label for="data">Job Description:</label>
        </th>
        <td>
          <em>
            All job descriptions must be run through Textio (the tool Mozilla
            uses to help de-bias our hiring process/job descriptions) and score
            at least a 90 out of 100 before being posted to the Mozilla Careers
            page. Please run your description through Textio before uploading
            it to your headcount request [% terms.bug %]. To learn more about
            Textio and learn how to create a Textio account,
            <a href="https://mana.mozilla.org/wiki/display/globalstaffing/Diversity+Recruiting+Initiatives">
              visit this Mana page</a>.<br><br>
            Please upload a draft of the Job Description you would like to be associated with this requisition
            (or <a href="javascript:jobDescToggle('text')">paste text as attachment</a>).</em><br>
          <input type="file" id="data" name="data" size="60"><br>
          <em>For job description formatting guidelines and help writing your job description please read the
            <a href="https://mana.mozilla.org/wiki/display/globalstaffing/Best+Practices+Guide%3A+Writing+Job+Descriptions"
               target="_blank" rel="noopener noreferrer">Best Practices Guide</a>.</em>
        </td>
      </tr>

      <tr id="jobDescText" style="display:none;">
        <th align="right" valign="top">
          <label for="attach_text">Job Description:</label>
        </th>
        <td>
          <em>Please copy/paste a draft of the Job Description you would like to be associated with this requisition
            (or <a href="javascript:jobDescToggle('file')">attach a file</a>).</em><br>
          <textarea id="attach_text" name="attach_text" cols="60" rows="4"></textarea><br>
          <em>For job description formatting guidelines and help writing your job description please read the
            <a href="https://mana.mozilla.org/wiki/display/globalstaffing/Best+Practices+Guide%3A+Writing+Job+Descriptions"
               target="_blank" rel="noopener noreferrer">Best Practices Guide</a>.</em>
        </td>
      </tr>

      <tr>
        <th align="right" valign="top">
          <label for="plan_impact" class="required">What part of your strategic plan does this role impact?</label>
        </th>
        <td>
          <textarea required id="plan_impact" name="plan_impact" cols="60" rows="4"></textarea>
        </td>
      </tr>

      <tr>
        <th align="right" valign="top">
          <label for="critical_success" class="required">Why is this critical for success?</label>
        </th>
        <td>
          <textarea required id="critical_success" name="critical_success" cols="60" rows="4"></textarea>
        </td>
      </tr>

      <tr>
        <th align="right">
          <label for="cc">CC:</label>
        </th>
        <td colspan="3">
          [% INCLUDE global/userselect.html.tmpl
             id       => "cc"
             name     => "cc"
             value    => cc
             size     => 60
             multiple => 5
             %]
        </td>
      </tr>
    </table>

    <br>

    <input type="submit" id="commit" value="Submit Request">
    <p>
      [ <span class="required_star">*</span> <span class="required_explanation">
      Required Field</span> ]
    </p>
  </form>

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

[% ELSE %]
  <p>Sorry, you do not have access to this page.</p>
[% END %]

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