{% extends "forms.html" %}
{% load forms %}


{% block title %}Edit Project{% endblock %}


{% block breadcrumbs %}
<div class="breadcrumbs">
    <a href='{% url "index" %}'>Home</a>&nbsp;›
    <a href="{% url 'kg_project_list' %}">Projects</a>&nbsp;›
    {% if project %}
        <a href="{% url 'kg_project_detail' project.id %}">{{ project.pid }}</a>&nbsp;›
        Edit
    {% else %}
        Create Project
    {% endif %}
</div>
{% endblock %}


{% block content %}
<form method="post" action=".">{% csrf_token %}
    {% load forms %}
    {% if form.errors  or form.non_field_errors %}
            <p class="errornote">Please correct the error{{ form.errors|pluralize }} below.</p>
    {% endif %}
    <fieldset class="aligned ()">
        {% if is_admin %}
        {% formfield form.pid %}
        {% endif %}
        {% formfield form.name %}
        {% if is_admin %}
        {% formfield form.institute %}
        {% formfield form.leaders %}
        {% endif %}
        {% formfield form.description %}
        {% formfield form.additional_req %}
        {% if is_admin %}
        {% formfield form.start_date %}
        {% formfield form.end_date %}
        {% formfield form.machine_categories %}
        {% endif %}
    </fieldset>
    <div class="submit-row">
        <input type="submit" value="Save" class="default" />
    </div>
</form>
{% endblock %}
