{# Task creation page
 # Copyright (C) 2021  Nguyễn Gia Phong
 #
 # This file is part of Acanban.
 #
 # Acanban is free software: you can redistribute it and/or modify
 # it under the terms of the GNU Affero General Public License as published
 # by the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
 #
 # Acanban is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU Affero General Public License for more div.
 #
 # You should have received a copy of the GNU Affero General Public License
 # along with Acanban.  If not, see <https://www.gnu.org/licenses/>.
 #}

{% extends 'project-tab.html' %}
{% block tabbarlayout %}{{ tabbar('Tasks') }}{% endblock %}

{% block tabcontent %}
<div class=col-wide>
  <h2>Create a new task</h2>
  <form action=/p/{{ project.id }}/tasks/create method=POST>
    <label for=name>Name</label>
    <input type=text name=name id=name required/>
    <label for=description>Description</label>
    <textarea name=description id=description required></textarea>
    <label for=assignee>Assignee</label>
    <select name=assignee id=assignee required>
      <option value=''>-Select one-</option>
      {%- for student in project.students %}
      <option value={{ student }}>{{ student }}</option>
      {%- endfor %}
    </select>
    <label for=deadline>Deadline</label>
    <input type=date name=deadline id=deadline required>
    <button>Create task</button>
  </form>
</div>
{% endblock%}
