{% extends "timepiece/project/base.html" %}
{% load bootstrap_toolkit %}

{% block crumbs %}
    {{ block.super }}
    <li>
        <span class="divider">/</span>
        {% if not project %}
            <a href="{% url create_project %}">Create Project</a>
        {% else %}
            <a href="{% url edit_project project.pk %}">Edit Project</a>
        {% endif %}
    </li>
{% endblock crumbs %}

{% block title %}{% if not project %}Create Project{% else %}Edit {{ project }}{% endif %}{% endblock %}

{% block content %}
    <div class="row-fluid">
        <div class="span12">
            <h2>{% if not project %}Create Project{% if business %} for {{ business }}{% endif %}{% else %}Edit {{ project }}{% endif %}</h2>

            <br style="clear: both;" />

            <form id="create-edit-project" class="form-horizontal" action="" method="post" accept-charset="utf-8">
                {% csrf_token %}
                {{ project_form|as_bootstrap:"horizontal" }}
                <div class="form-actions">
                    <input class="btn btn-primary" type='submit' name='submit' value='Save' />
                    <input class="btn" type='button' value='Cancel' onclick='history.go(-1)' />
                </div>
            </form>
        </div>
    </div>
{% endblock %}
