{% extends 'money/base.html' %}
{% block title %}Add Pockets{% endblock %}

{% block body_block %}

    {% if user.is_authenticated %}


        <form role="form" class="form-horizontal" method="post" action="/money/add_Pockets/">
            {% csrf_token %}
            <div class="alert alert-info" role="alert"><strong>Add Expenditure</strong></div>

            <div class="control-group controls-row">
                <label class="control-label span1" for="id_pocket_name"><strong>Pocket Name</strong></label>
                {{ formset.pocket_name }}
                <label class="control-label span1" for="id_pocket_description"><strong>Description</strong></label>
                {{ formset.pocket_description }}


            </div>
            <hr>
            <div class="alert alert-info" role="alert"><strong>Currency Notes in Pocket - This will be used to calculate Initial Amount</strong></div>
            <div class="control-group controls-row">
                <div class="input-prepend">
                    <span class="add-on">1000s</span>
                    {{ formset.pocket_1000 }}
                </div>
                <div class="input-prepend">
                    <span class="add-on">500s</span>
                    {{ formset.pocket_500 }}
                </div>
                <div class="input-prepend">
                    <span class="add-on">100s</span>
                    {{ formset.pocket_100 }}
                </div>
                <div class="input-prepend">
                    <span class="add-on">50s</span>
                    {{ formset.pocket_50 }}
                </div>
            </div>


            <div class="control-group controls-row">
                <div class="input-prepend">
                    <span class="add-on">20s&nbsp;&nbsp;&nbsp;&nbsp;</span>
                    {{ formset.pocket_20 }}
                </div>
                <div class="input-prepend">
                    <span class="add-on">10s&nbsp;&nbsp;&nbsp;</span>
                    {{ formset.pocket_10 }}
                </div>
                <div class="input-prepend">
                    <span class="add-on">5s&nbsp;&nbsp;&nbsp;&nbsp;</span>
                    {{ formset.pocket_5 }}
                </div>
                <div class="input-prepend">
                    <span class="add-on">2s&nbsp;&nbsp;</span>
                    {{ formset.pocket_2 }}
                </div>
            </div>

             <div class="control-group controls-row">
                <div class="input-prepend">
                    <span class="add-on">1s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                    {{ formset.pocket_1 }}
                </div>
                <div class="input-prepend">
                    <span class="add-on">change</span>
                    {{ formset.pocket_change }}
                </div>

                </div>

            <!-- form group controls-row -->
            <br>
            <div class="control-group controls-row">
            <input type="submit" class="btn btn-primary" name="submit" value="Create Pocket"/>
                <input type="reset" class="btn btn-primary" name="reset" value="Reset"/>
                </div>
            </div>
        </form>

    {% else %}
        <h1> Dont Try to be over smart - Log in here </h1>
        <ui>
            <li><a href="/money/register/">Register</a></li>
            <li><a href="/money/login/">Login</a></li>
        </ui>
    {% endif %}

{% endblock %}

