{% extends "base.html" %}

{% from "components/icon.html" import Icon %}
{% from "components/text_input.html" import TextInput %}
{% from "components/options_input.html" import OptionsInput %}
{% from "components/selector.html" import Selector %}

{% block content %}

<form method="POST" action="{{ url_for('workspaces.create_member', workspace_id=workspace.id) }}" autocomplete="false">
  {{ form.csrf_token }}

  <div class="panel">

    <div class="panel__heading">
      <h1>New Member</h1>
      <div class="subtitle"><h2>Account Details</h2></div>
    </div>

    <div class="panel__content">
      {{ TextInput(form.first_name) }}
      {{ TextInput(form.last_name) }}
      {{ TextInput(form.email,placeholder='jane@mail.mil', validation='email') }}
      {{ TextInput(form.dod_id,placeholder='10-digit number on the back of the CAC', validation='dodId') }}
      {{ Selector(form.workspace_role) }}
    </div>
  </div>


  <div class='action-group'>
    <button class="usa-button usa-button-big usa-button-primary" tabindex="0">Add User</button>
    <a href='{{ url_for("workspaces.workspace_members", workspace_id=workspace.id) }}' class='action-group__action icon-link'>
      {{ Icon('x') }}
      <span>Cancel</span>
    </a>
  </div>


</form>




{% endblock %}
