[%# This Source Code Form is subject to the terms of the Mozilla Public
  # License, v. 2.0. If a copy of the MPL was not distributed with this
  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  #
  # This Source Code Form is "Incompatible With Secondary Licenses", as
  # defined by the Mozilla Public License, v. 2.0.
  #%]

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

[% PROCESS global/header.html.tmpl
   title = "Mozilla Project Review"
   generate_api_token = 1
   style_urls = [ 'skins/standard/create_bug.css',
                  'extensions/MozProjectReview/web/style/moz_project_review.css'
                  'js/jquery/plugins/datetimepicker/datetimepicker.css' ]
   javascript_urls = [ 'js/field.js',
                       'extensions/MozProjectReview/web/js/moz_project_review.js' ]
   jquery = ["datetimepicker" ]
%]

<div id="custom_form_list">
  <div id="custom_form_list_text">
    Other task-specific [% terms.bug %] forms exist that should be used if appropriate:
    <ul>
      <li><a href="[% basepath FILTER none %]enter_bug.cgi?product=Mozilla%20Foundation%20Operations">Mozilla Foundation Vendor Request</a></li>
      <li><a href="[% basepath FILTER none %]form.name.clearance">Name Clearance Request</a></li>
      <li><a href="[% basepath FILTER none %]form.nda">NDA Request</a></li>
    </ul>
  </div>
</div>

<div id="message">
  Welcome to the new contract kick-off form! We have revised the kick-off form to be specifically for contracts
  and to be easier to use. There's no longer a master [% terms.bug %]. A legal [% terms.bug %] will be the main
  [% terms.bug %], and finance and security [% terms.bugs %] will be blockers of it. You can add attachments as
  part of submitting your request. If you have any questions or comments, please contact
  <a href="mailto:liz@mozilla.com">liz@mozilla.com</a>.
</div>

<p>
  <strong>Please use this form for submitting a contract request, spend approval request and/or vendor review request.</strong>
</p>

<p>
  (<span class="required_star">*</span> =
  <span class="required_explanation">Required Field</span>)
</p>

<form method="post" action="[% basepath FILTER none %]post_bug.cgi" id="mozProjectForm" enctype="multipart/form-data">
  <input type="hidden" name="filed_via" value="custom_form">
  <input type="hidden" id="bug_type" name="bug_type" value="task">
  <input type="hidden" id="product" name="product" value="Legal">
  <input type="hidden" id="component" name="component" value="General">
  <input type="hidden" id="rep_platform" name="rep_platform" value="All">
  <input type="hidden" id="op_sys" name="op_sys" value="All">
  <input type="hidden" id="version" name="version" value="unspecified">
  <input type="hidden" id="format" name="format" value="moz-project-review">
  <input type="hidden" id="groups" name="groups" value="mozilla-employee-confidential">
  <input type="hidden" id="short_desc" name="short_desc" value="">
  <input type="hidden" id="token" name="token" value="[% token FILTER html %]">

  <div id="initial_questions">
    <div class="header">Initial Questions</div>

    <div id="contract_type_row" class="field_row">
      <span class="field_label required">What are you doing?:</span>
      <span class="field_data">
        <div class="field_description">Select one from the list</div>
        <select name="contract_type" id="contract_type">
          <option value="">Select One</option>
          <option value="Engaging a new vendor company">Engaging a new vendor company</option>
          <option value="Engaging an individual (independent contractor, temp agency worker, incorporated)">Engaging an individual (independent contractor, temp agency worker, incorporated)</option>
          <option value="Adding a new SOW with a vendor">Adding a new SOW with a vendor</option>
          <option value="Extending a SOW or renewing a contract">Extending a SOW or renewing a contract</option>
          <option value="Purchasing software">Purchasing software</option>
          <option value="Purchasing hardware">Purchasing hardware</option>
          <option value="Signing up for an online service">Signing up for an online service</option>
          <option value="An agreement with a partner">An agreement with a partner</option>
          <option value="Other">Other</option>
        </select>
        <br>
        <input type="text" name="contract_type_other" id="contract_type_other" size="60" style="display:none;">
      </span>
    </div>

    <div id="description_row" class="field_row">
      <span class="field_label required">Description:</span>
      <span class="field_data">
        <div class="field_description">
          Expand on the request, but most needed information will be requested in later questions.
        </div>
        <textarea name="comment" id="comment" rows="10" cols="80"></textarea>
      </span>
    </div>

    <div id="other_party_row" class="field_row">
      <span class="field_label required">Vendor/Contractor/Partner Name:</span>
      <span class="field_data">
        <div class="field_description">Name of other party involved</div>
        <input type="text" name="other_party" id="other_party" size="60">
      </span>
    </div>

    <div id="cc_row" class="field_row">
      <span class="field_label">Cc:</span>
      <span class="field_data">
        [% INCLUDE global/userselect.html.tmpl
           id       => "cc"
           name     => "cc"
           size     => 60
           classes  => ["bz_userfield"]
           multiple => 5
        %]
      </span>
    </div>

    <div id="key_initiative_row" class="field_row">
      <span class="field_label required">Key Initiative:</span>
      <span class="field_data">
        <div class="field_description">
          Which key initiative does this support?
        </div>
        <select name="key_initiative" id="key_initiative">
          <option value="">Select One</option>
          <option value="Business Support">Business Support</option>
          <option value="Connected Devices">Connected Devices</option>
          <option value="Content Services">Content Services</option>
          <option value="Firefox Desktop">Firefox Desktop</option>
          <option value="Firefox Mobile">Firefox Mobile</option>
          <option value="Firefox Platform">Firefox Platform</option>
          <option value="Labs/Research/H3">Labs/Research/H3</option>
          <option value="Other">Other</option>
        </select>
        <br>
        <input type="text" name="key_initiative_other" id="key_initiative_other" size="60" style="display:none;">
      </span>
    </div>

    <div id="mozilla_data_row" class="field_row">
      <span class="field_label required">Data Access</span>
      <span class="field_data">
        <div class="field_description">
          Will the vendor or the vendor's systems access, interact with, or
          store customer, contributor, user, or employee data? Examples of such
          data include email addresses, first and last name, addresses, phone
          numbers, credit card data.)
        </div>
        <select name="mozilla_data" id="mozilla_data">
          <option value="">Select One</option>
          <option value="Don't Know">Don't Know</option>
          <option value="Yes">Yes</option>
          <option value="No">No</option>
        </select>
        <div id="mozilla_data_explain_row" style="display:none;">
          <div class="field_description required">
            If yes, please explain
          </div>
          <textarea name="mozilla_data_explain" id="mozilla_data_explain" rows="10" cols="80"></textarea>
        </div>
     </span>
    </div>

    <div id="vendor_cost_row" class="field_row">
      <span class="field_label required">Vendor Cost:</span>
      <span class="field_data">
        <div class="field_description">
          What is the anticipated cost of the vendor relationship? (Entire Contract Cost, not monthly cost)
        </div>
        <select name="vendor_cost" id="vendor_cost">
          <option value="">Select One</option>
          <option value="&lt; $25,000 PO Needed">&lt; $25,000 PO Needed</option>
          <option value="&lt; $25,000 No PO Needed">&lt; $25,000 No PO Needed</option>
          <option value="&gt; $25,000">&gt; $25,000</option>
        </select>
      </span>
    </div>

    <div id="timeframe_row" class="field_row">
      <span class="field_label required">Time Frame For Completion:</span>
      <span class="field_data">
        <div class="field_description">What is the desired time frame to have this completed.</div>
        <select name="timeframe" id="timeframe">
          <option value="">Select One</option>
          <option value="2 days">2 days</option>
          <option value="a week">a week</option>
          <option value="2-4 weeks">2-4 weeks</option>
          <option value="will take a while but please start soon">
            will take a while but please start soon</option>
          <option value="no rush" selected>no rush</option>
        </select>
      </span>
    </div>

    <div id="contract_priority_row" class="field_row">
      <span class="field_label required">Priority:</span>
      <span class="field_data">
        <div class="field_description">Priority to your team</div>
        <select name="contract_priority" id="contract_priority">
          <option value="">Select One</option>
          <option value="high">High</option>
          <option value="medium">Medium</option>
          <option value="low">Low</option>
        </select>
      </span>
    </div>

    <div id="internal_org_row" class="field_row">
      <span class="field_label required">Internal Organization:</span>
      <span class="field_data">
        <select id="internal_org" name="internal_org">
          <option value="">Select One</option>
          <option value="Firefox">Firefox</option>
          <option value="Connected Devices">Connected Devices</option>
          <option value="Emerging Technologies">Emerging Technologies</option>
          <option value="Innovation">Innovation</option>
          <option value="Marketing">Marketing</option>
          <option value="BD/Legal/Policy">BD/Legal/Policy</option>
          <option value="Finance &amp; Accounting">Finance &amp; Accounting</option>
          <option value="WPR">WPR</option>
          <option value="IT">IT</option>
          <option value="People">People</option>
          <option value="Internal Comms">Internal Comms</option>
          <option value="Metrics">Metrics</option>
          <option value="Other">Other</option>
        </select>
      </span>
    </div>

    <div id="total_cost_row" class="field_row" style="display:none;">
      <span class="field_label required">Total Cost:</span>
      <span class="field_data">
        <div class="field_description">
          Please enter the total cost if a one time payment or the total for the entire
          contract term if monthly or annual payments
        </div>
        <input type="text" name="total_cost" id="total_cost" size="60">
      </span>
    </div>

    <div id="attachment_row" class="field_row">
      <span class="field_label">Attachment:</span>
      <span class="field_data">
      <div class="field_description">
        Upload any supporting document as draft SOW, quote, order form, etc.
      </div>
      <input type="file" id="attachment" name="data" size="50"><br>
      <input type="hidden" name="contenttypemethod" value="autodetect">
      <div class="field_description">Description</div>
      <input type="text" name="description" id="description" size="30">
    </div>
  </div>

  <div id="independent_contractor_questions" style="display:none">
    <div class="header">Independent Contractor Questions</div>

    <div id="independent_contractor_prev_work_row" class="field_row">
      <span class="field_label required">Previous Work:</span>
      <span class="field_data">
        <div class="field_description">Is this someone we've worked with before?</div>
        <select name="independent_contractor_prev_work" id="independent_contractor_prev_work">
          <option value="">Select One</option>
          <option value="Yes">Yes</option>
          <option value="No">No</option>
        </select>
        <div id="independent_contractor_prev_work_bug_row" style="display:none;">
          <div class="field_description required">
            If yes, enter the [% terms.bug %] number for the previous work or note that this is a former employee
          </div>
          <input type="text" name="independent_contractor_prev_work_bug" id="independent_contractor_prev_work_bug" size="30">
        </div>
      </span>
    </div>

    <div id="independent_contractor_incorporated_row" class="field_row">
      <span class="field_label required">Incorporated:</span>
      <span class="field_data">
        <div class="field_description">Has this person incorporated (sole proprietorship or similar form)?</div>
        <select name="independent_contractor_incorporated" id="independent_contractor_incorporated">
          <option value="">Select One</option>
          <option value="Yes">Yes</option>
          <option value="No">No</option>
        </select>
      </span>
    </div>

    <div id="independent_contractor_staff_agency_row" class="field_row">
      <span class="field_label required">Staffing Agency:</span>
      <span class="field_data">
        <div class="field_description">Will the person be engaged through a staffing agency?</div>
        <select name="independent_contractor_staff_agency" id="independent_contractor_staff_agency">
          <option value="">Select One</option>
          <option value="Yes">Yes</option>
          <option value="No">No</option>
        </select>
      </span>
    </div>

    <div id="independent_contractor_other_clients_row" class="field_row">
      <span class="field_label required">Other Clients:</span>
      <span class="field_data">
        <div class="field_description">Does the person have other clients?</div>
        <select name="independent_contractor_other_clients" id="independent_contractor_other_clients">
          <option value="">Select One</option>
          <option value="Yes">Yes</option>
          <option value="No">No</option>
        </select>
      </span>
    </div>

    <div id="independent_contractor_dupe_services_row" class="field_row">
      <span class="field_label required">Duplicate Services:</span>
      <span class="field_data">
        <div class="field_description">Does the person provide services similar to a paid Mozilla employee?</div>
        <select name="independent_contractor_dupe_services" id="independent_contractor_dupe_services">
          <option value="">Select One</option>
          <option value="Yes">Yes</option>
          <option value="No">No</option>
        </select>
        <div id="independent_contractor_dupe_services_temp_row" style="display:none;">
          <div class="field_description required">
            If yes, is the person primarily being engaged due to a temporary increase in workload or as backfill for an employee on leave?
          </div>
          <select name="independent_contractor_dupe_services_temp" id="independent_contractor_dupe_services_temp">
            <option value="">Select One</option>
            <option value="Yes">Yes</option>
            <option value="No">No</option>
          </select>
        </div>
      </span>
    </div>

    <div id="independent_contractor_self_manage_row" class="field_row">
      <span class="field_label required"a>Self Managed:</span>
      <span class="field_data">
        <div class="field_description">Will the person be managing their own time?</div>
        <select name="independent_contractor_self_manage" id="independent_contractor_self_manage">
          <option value="">Select One</option>
          <option value="Yes">Yes</option>
          <option value="No">No</option>
        </select>
      </span>
    </div>

-    <div id="independent_contractor_own_equipment_row" class="field_row">
      <span class="field_label required">Own Equipment:</span>
      <span class="field_data">
        <div class="field_description">Will the person be using their own equipment?</div>
        <select name="independent_contractor_own_equipment" id="independent_contractor_own_equipment">
          <option value="">Select One</option>
          <option value="Yes">Yes</option>
          <option value="No">No</option>
        </select>
      </span>
    </div>

     <div id="independent_contractor_mozilla_facility_row" class="field_row">
      <span class="field_label required">Mozilla Facility:</span>
      <span class="field_data">
        <div class="field_description">Will the person be regularly working at a Mozilla facility?</div>
        <select name="independent_contractor_mozilla_facility" id="independent_contractor_mozilla_facility">
          <option value="">Select One</option>
          <option value="Yes">Yes</option>
          <option value="No">No</option>
        </select>
      </span>
    </div>

    <div id="independent_contractor_supervising_row" class="field_row">
      <span class="field_label required">Supervise Mozilla Employees:</span>
      <span class="field_data">
        <div class="field_description">Will the person be supervising Mozilla employees?</div>
        <select name="independent_contractor_supervising" id="independent_contractor_supervising">
          <option value="">Select One</option>
          <option value="Yes">Yes</option>
          <option value="No">No</option>
        </select>
      </span>
    </div>
  </div>

  <div id="contract_specific_questions">
    <div class="header">Contract Specific Questions</div>

    <div id="sow_details" style="display:none;">
      <div class=field_row">
        <span class="field_label">SOW Details:</span>
        <span class="field_data">
          Please provide the following information for the SOW
        </span>
      </div>

      <div id="sow_vendor_address_row" class="field_row">
        <span class="field_label required">Vendor Address:</span>
        <span class="field_data">
          <textarea name="sow_vendor_address" id="sow_vendor_address" rows="10" cols="80"></textarea>
        </span>
      </div>

      <div id="sow_vendor_email_row" class="field_row">
        <span class="field_label required">Vendor Email for Legal Notices:</span>
        <span class="field_data">
          <input type="text" name="sow_vendor_email" id="sow_vendor_email" size="60">
        </span>
      </div>

      <div id="sow_vendor_mozcontact_row" class="field_row">
        <span class="field_label required">Main Mozilla Contact:</span>
        <span class="field_data">
          [% INCLUDE global/userselect.html.tmpl
             id       => "sow_vendor_mozcontact"
             name     => "sow_vendor_mozcontact"
             size     => 60
             classes  => ["bz_userfield"]
          %]
        </span>
      </div>

      <div id="sow_vendor_contact_row" class="field_row">
        <span class="field_label required">Main Vendor Contact and Email:</span>
        <span class="field_data">
          <input type="text" name="sow_vendor_contact" id="sow_vendor_contact" size="60">
        </span>
      </div>

      <div id="sow_vendor_services_row" class="field_row">
        <span class="field_label required">Vendor Services to be Provided:</span>
        <span class="field_data">
          <textarea name="sow_vendor_services" id="sow_vendor_services" rows="10" cols="80"></textarea>
        </span>
      </div>

      <div id="sow_vendor_mozilla_systems_row" class="field_row">
        <span class="field_label required">Mozilla Systems:</span>
        <span class="field_data">
          <div class="field_description">
            Will vendor require access to Mozilla systems (e.g. Workday, email, Google Docs, servers)?
          </div>
          <select name="sow_vendor_mozilla_systems" id="sow_vendor_mozilla_systems">
            <option value="">Select One</option>
            <option value="Yes">Yes</option>
            <option value="No">No</option>
          </select>
          <div id="sow_vendor_mozilla_systems_explain_row" style="display:none;">
            <div class="field_description required">
              If yes, please explain
            </div>
            <textarea name="sow_vendor_mozilla_systems_explain" id="sow_vendor_mozilla_systems_explain" rows="10" cols="80"></textarea>
          </div>
        </span>
      </div>

      <div id="sow_vendor_onsite_row" class="field_row">
        <span class="field_label required">Vendor Onsite:</span>
        <span class="field_data">
          <div class="field_description">
            Will vendor be physically onsite at a Mozilla office?
          </div>
          <select name="sow_vendor_onsite" id="sow_vendor_onsite">
            <option value="">Select One</option>
            <option value="Yes">Yes</option>
            <option value="No">No</option>
          </select>
          <div id="sow_vendor_onsite_where_row" style="display:none;">
            <div class="field_description required">
              If yes, where and when?
            </div>
            <textarea name="sow_vendor_onsite_where" id="sow_vendor_onsite_where" rows="10" cols="80"></textarea>
          </div>
        </span>
      </div>

      <div id="sow_vendor_deliverables_row" class="field_row">
        <span class="field_label required">Description of Deliverables:</span>
        <span class="field_data">
          <textarea name="sow_vendor_deliverables" id="sow_vendor_deliverables" rows="10" cols="80"></textarea>
        </span>
      </div>

      <div id="sow_start_date_row" class="field_row">
        <span class="field_label required">Start Date:</span>
        <span class="field_data">
          <input class="date-field" name="sow_start_date" id="sow_start_date">
          <img class="date-field-img" id="sow_start_date-img"
               src="[% basepath FILTER none %]extensions/BugModal/web/calendar.png" width="16" height="16">
        </span>
      </div>

      <div id="sow_end_date_row" class="field_row">
        <span class="field_label required">End Date:</span>
        <span class="field_data">
          <input class="date-field" name="sow_end_date" id="sow_end_date">
          <img class="date-field-img" id="sow_end_date-img"
               src="[% basepath FILTER none %]extensions/BugModal/web/calendar.png" width="16" height="16">
        </span>
      </div>

      <div id="sow_vendor_payment_row" class="field_row">
        <span class="field_label required">Rate of Pay:</span>
        <span class="field_data">
          <div class="field_description">Include currency</div>
          <input type="text" name="sow_vendor_payment" id="sow_vendor_payment" size="60">
        </span>
      </div>

      <div id="sow_vendor_payment_basis_row" class="field_row">
        <span class="field_label required">Basis for Payment:</span>
        <span class="field_data">
          <div class="field_description">hourly, flat fee, per deliverable, per milestone, etc.</div>
          <input type="text" name="sow_vendor_payment_basis" id="sow_vendor_payment_basis" size="60">
        </span>
      </div>

      <div id="sow_vendor_cap_expenses_row" class="field_row">
        <span class="field_label required">Cap on reimbursable expenses, if any:</span>
        <span class="field_data">
          <input type="text" name="sow_vendor_cap_expenses" id="sow_vendor_cap_expenses" size="60">
        </span>
      </div>

      <div id="sow_vendor_hours_row" class="field_row">
        <span class="field_label">Max Hours/Week (and average if different):</span>
        <span class="field_data">
          <div class="field_description">If paid hourly</div>
          <input type="text" name="sow_vendor_hours" id="sow_vendor_hours" size="60">
        </span>
      </div>

      <div id="sow_vendor_payment_schedule_row" class="field_row">
        <span class="field_label required">Payment Schedule:</span>
        <span class="field_data">
          <div class="field_description">When will we make payments? E.g. every 30 days; half due up front,
            half on completion; following acceptance of each deliverable, etc.</div>
          <input type="text" name="sow_vendor_payment_schedule" id="sow_vendor_payment_schedule" size="60">
        </span>
      </div>

      <div id="sow_vendor_total_max_row" class="field_row">
        <span class="field_label required">Total Not to Exceed Amount:</span>
        <span class="field_data">
          <input type="text" name="sow_vendor_total_max" id="sow_vendor_total_max" size="60">
        </span>
      </div>

      <div id="sow_vendor_special_terms_row" class="field_row">
        <span class="field_label">Any Special Terms:</span>
        <span class="field_data">
          <textarea name="sow_vendor_special_terms" id="sow_vendor_special_terms" rows="10" cols="80"></textarea>
        </span>
      </div>
    </div>

    <div id="vendor_services_where_row" class="field_row">
      <span class="field_label required">Where will the services be provided?:</span>
      <span class="field_data">
        <input type="text" name="vendor_services_where" id="vendor_services_where" size="60">
      </span>
    </div>
  </div>

  <div id="sec_review_questions" style="display:none">
    <div class="header">Vendor Security Review</div>

    <div id="sec_review_invitees_row" class="field_row">
      <span class="field_label">Review Invitees:</span>
      <span class="field_data">
        <div class="field_description">Whom should be invited to the review?</div>
        <input type="text" name="sec_review_invitees" id="sec_review_invitees" size="60">
      </span>
    </div>

    <div id="sec_review_extra_row" class="field_row">
      <span class="field_label">Extra Information:</span>
      <span class="field_data">
        <div class="field_description">
          Please add any additional information related to data handling by the Vendor you think the security team should know.
        </div>
        <textarea name="sec_review_extra" id="sec_review_extra" rows="10" cols="80"></textarea>
      </span>
    </div>
  </div>

  <div id="finance_questions" style="display:none">
    <div class="header">Finance</div>

    <div id="finance_purchase_inbudget_row" class="field_row">
      <span class="field_label required">Is this line item in budget?:</span>
      <span class="field_data">
        <div class="field_description">If not, please explain purchase need and why not in budget.</div>
        <textarea name="finance_purchase_inbudget" id="finance_purchase_inbudget" rows="10" cols="80"></textarea>
      </span>
    </div>

    <div id="finance_purchase_what_row" class="field_row">
      <span class="field_label required">What is the purchase for?:</span>
      <span class="field_data">
        <textarea name="finance_purchase_what" id="finance_purchase_what" rows="10" cols="80"></textarea>
      </span>
    </div>

    <div id="finance_purchase_why_row" class="field_row">
      <span class="field_label required">Why is the purchase needed?:</span>
      <span class="field_data">
        <textarea name="finance_purchase_why" id="finance_purchase_why" rows="10" cols="80"></textarea>
      </span>
    </div>

    <div id="finance_purchase_risk_row" class="field_row">
      <span class="field_label required">What is the risk<br>if not purchased?:</span>
      <span class="field_data">
        <textarea name="finance_purchase_risk" id="finance_purchase_risk" rows="10" cols="80"></textarea>
      </span>
    </div>

    <div id="finance_purchase_alternative_row" class="field_row">
      <span class="field_label required">What is the alternative?:</span>
      <span class="field_data">
        <textarea name="finance_purchase_alternative" id="finance_purchase_alternative" rows="10" cols="80"></textarea>
      </span>
    </div>

    <div id="finance_shipment_address_row" class="field_row">
      <span class="field_label">What is the shipment address<br>(if applicable)?:</span>
      <span class="field_data">
        <div class="field_description">Please enter the full address.</div>
        <textarea name="finance_shipment_address" id="finance_shipment_address" rows="10" cols="80"></textarea>
      </span>
    </div>
  </div>

  <input type="submit" id="commit" value="Submit Review">
</form>

<p>
  Thanks for contacting us. Legal, Finance, and Security [% terms.bugs %] will be opened
  so those teams can work with you on this request.
</p>

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