{% extends 'timepiece/time-sheet/base.html' %}
{% load timepiece_tags bootstrap_toolkit %}
{% load url from future %}

{% block crumbs %}
    {{ block.super }}
    <li><span class="divider">/</span> <a href="{% url 'timepiece-clock-in' %}">Clock In</a></li>
{% endblock crumbs %}

{% block title %}Clock In{% endblock %}

{% block content %}
    <div class="row-fluid">
        <div class="span12">
            <h2>Clock Into Project</h2>

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

            {% if active %}
                <div class="alert">
                    <button type="button" class="close" data-dismiss="alert">x</button>
                    <h4 class="alert-heading">Switching Projects</h4>
                    <p>You are currently clocked into {{active.activity.name }} on {{ active.project.name }} with {{ active.get_active_seconds|humanize_seconds }} time clocked. Switching to a new project below will clock out of this entry and start a new one. Please enter any notes about switching below.</p>
                </div>
            {% endif %}

            <form class="form-horizontal" action="{% url 'timepiece-clock-in' %}" method="post" accept-charset="utf-8">
                {% csrf_token %}
                {{ form|as_bootstrap:"horizontal" }}
                <div class="form-actions">
                    <input class="btn btn-primary" type="submit" name="submit" value="Clock In" />
                    <input class="btn cancel" type="button" value="Cancel" onclick="window.location='{% url 'dashboard' %}'" />
                </div>
            </form>
        </div>
    </div>
{% endblock %}
