{% extends "kegadmin/base.html" %}
{% load kegweblib %}
{% load crispy_forms_tags %}

{% block title %}Kegbot Admin: Edit Drink {{ drink.id }} | {{ block.super }}{% endblock %}
{% block pagetitle %}Kegbot Admin: Edit Drink {{ drink.id }}{% endblock %}

{% block kegadmin-main %}

<div class="row-fluid">

<div class="span9">

<h2>Drink Details</h2>

<div id="cancelModal" class="modal hide fade" tabindex="-1"
    role="dialog" aria-labelledby="cancelDialogLabel" aria-hidden="true">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 id="cancelDialogLabel">Really Cancel Drink {{ drink.id }}?</h3>
    </div>
    <div class="modal-body">
        <p>
            Are you sure you want to cancel <b>Drink {{ drink.id }}</b>{% if drink.user %} by <b>{{ drink.user }}</b>{% endif %}?
        </p>
        <p>
            Canceling the drink will <b>immediately delete the drink and all data about it</b>, including
            any pictures recorded during the pour.  This action cannot be undone.
        </p>
    </div>
    <div class="modal-footer">
         <form action="" method="POST">{% csrf_token %}
         <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
             <input type="submit" name="submit_cancel"
                class="btn btn-danger" value="Cancel Drink"/>
         </form>
    </div>
</div>

<table class="table table-bordered">
<tbody>
<tr>
    <th>User</th>
    <td>{{ drink.user }}</td>
</tr>
<tr>
    <th>Date</th>
    <td>{{ drink.time }}</td>
</tr>
<tr>
    <th></th>
    <td><a href="#cancelModal" role="button" class="btn btn-danger" data-toggle="modal">Cancel Drink</a>
    </td>
</tr>

</table>

</div>

</div>
{% endblock %}
