{% extends 'requests/_new.html' %}

{% from "components/alert.html" import Alert %}
{% from "components/text_input.html" import TextInput %}
{% from "components/checkbox_input.html" import CheckboxInput %}

{% block heading %}
  Designate a Workspace Owner
{% endblock %}

{% block form %}

{% if f.errors %}
  {{ Alert('There were some errors',
    message="<p>Please see below.</p>",
    level='error'
  ) }}
{% endif %}

<poc inline-template v-bind:initial-data='{{ f.data|tojson }}'>
  <div>

    <p>The Workspace Owner is the primary point of contact and technical administrator of the JEDI Cloud Workspace and will have the
      following responsibilities:</p>
    <ul>
      <li>Organize your cloud-hosted systems into projects and environments</li>
      <li>Add users to this workspace and manage members</li>
      <li>Manage access to the JEDI Cloud service provider’s portal</li>
    </ul>
    </p>

    <p>This person must be a DoD employee (not a contractor).</p>
    <p>The Workspace Owner may be you. You will be able to add other administrators later. This person will be invited via email
      once your request is approved.</p>

    {{ CheckboxInput(f.am_poc) }}

    <template v-if="!am_poc" v-cloak>

      <div class='form-row'>
        <div class='form-col form-col--half'>{{ TextInput(f.fname_poc) }}</div>
        <div class='form-col form-col--half'>{{ TextInput(f.lname_poc) }}</div>
      </div>

      <div class='form-row'>
        <div class='form-col form-col--half'>{{ TextInput(f.email_poc, validation='email', placeholder='e.g. jane@mail.mil') }}</div>
        <div class='form-col form-col--half'>{{ TextInput(f.dodid_poc, validation='dodId', placeholder='10-digit number on back of CAC') }}</div>
      </div>

    </template>

  </div>
</poc>
{% endblock %}
