{% extends 'base.html' %}

{% block content %}

<form method="post" action="/kalendar">
    <br>
    <div class="container text-center">
        <div class="row">
            <div class="col">
                Date From
            </div>
            <div class="col">
                <input type="datetime-local" name="dataFrom"/>
            </div>
            <div class="col">
                Date Bis
            </div>
            <div class="col">
                <input type="datetime-local" name="dataBis"/>
            </div>
            <div class="col">
                Name
            </div>
            <div class="col">
                <select id="alim_type" name="person">
<!--                        <option value="all">all</option>-->
                        {% for tt in persons %}
                            <option name="person" value={{tt}}>{{tt}}</option>
                        {% endfor %}
                </select>
            </div>
            <div class="col">
                <label>Termin</label>
                <input type="text" name="termin" required/>
            </div>

            <div class="col">
                <input type="submit" name="add_to_kalendar"/>
            </div>
        </div>
    </div>
    <br>
</form>
<br>

<div class="container text-center">
    <div class="row">
        <div class="col">
            Data From: {{dataFrom}}
        </div>
        <div class="col">
            Data Bis: {{dataBis}}
        </div>
    </div>
</div>
<br>
<table class="table" id="myTable99" border="1">
    <script src="{{ url_for('static', filename='js/myfile.cs') }}"></script>
    <thead>
        <tr>
            {% for colName in tableHead %}
                <th scope="col" onclick="sortTable(0)">{{colName}}</th>
            {% endfor %}
        </tr>
    </thead>

    {% for row in tableData %}
    <tr>
        {% for col in row %}
            <td>{{col}}</td>
        {% endfor %}
    </tr>
    {% endfor %}
</table>

{% endblock %}