{% load static %}
{% load custom_tags_and_filters %}
<div class="row" style="margin-top:30px">
    <div class="col-xs-offset-3 col-xs-6"
         onclick="tool_information('{% url 'kiosk_tool_information' tool.id customer.id back %}')">
        <div class="alert alert-warning" style="text-align:center; margin-bottom:0; font-size:x-large">Go back</div>
    </div>
</div>
<h2>Extra information needed</h2>
<form id="tool_reservation" method="post">
    {% csrf_token %}
    <input type="hidden" name="back" value="{{ back }}">
    <input type="hidden" name="tool_id" value="{{ tool.id }}">
    <input type="hidden" name="project_id" value="{{ project.id }}">
    <input type="hidden" name="customer_id" value="{{ customer.id }}">
    <input type="hidden" name="start_date" value="{{ request_start_date }}">
    <input type="hidden" name="end_date" value="{{ request_end_date }}">
    <input type="hidden" name="start" value="{{ request_start }}">
    <input type="hidden" name="end" value="{{ request_end }}">
    <input type="hidden" name="configured" value="true">
    {% if reservation_questions %}
        <div id="reservation_questions">
            <h4>Please answer the following questions</h4>
            {{ reservation_questions }}
        </div>
    {% endif %}
    {% if tool_accessories %}
        {% include "calendar/accessories_helper.html" %}
    {% endif %}
    {% if configurations %}
        <h4>Choose tool configuration settings</h4>
        {% if notice_limit > 0 %}
            <div class="alert alert-info">
                <strong>Please note:</strong> {{ notice_limit }} hours of advance notice is required when reserving this tool in order to configure it properly. A tool is not guaranteed to be configured properly if a reservation is created or modified on short notice.
            </div>
        {% endif %}
        {% include 'configuration/configuration_reservation_helper.html' %}
    {% endif %}
    <div class="form-group text-center" style="margin-top:40px">
        {% button type="save" submit=False style="text-align:center; margin-bottom:0; font-size:x-large" onclick="reserve_tool()" value="Create the reservation" %}
    </div>
</form>
<div style="height:350px"></div>
<script>revert(120);</script>
