2019-05-10 09:36:45 +02:00
|
|
|
{% set title = "lnk_bills" %}
|
2019-04-26 06:22:43 +02:00
|
|
|
|
|
|
|
{% extends "layout/dash.html" %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
2019-05-10 08:24:13 +02:00
|
|
|
<style id="grid">
|
|
|
|
.container.module:nth-child(1n) {
|
|
|
|
grid-area: 1 / 1 / 5 / 5;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
2019-04-26 06:22:43 +02:00
|
|
|
<div class="container module">
|
|
|
|
|
2019-04-26 07:50:49 +02:00
|
|
|
<button type="button" class="btn btn-primary" style="margin:10px;" data-toggle="modal" data-target="#myModal">Add</button>
|
|
|
|
<div class="modal fade" id="myModal" role="dialog">
|
|
|
|
<div class="modal-dialog">
|
|
|
|
<!-- Modal content-->
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<h4 class="modal-title">Add bill</h4>
|
|
|
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
{% macro render_field(field) %}
|
|
|
|
<dt>{{ field.label }}
|
|
|
|
<dd>{{ field(**kwargs)|safe }}
|
|
|
|
{% if field.errors %}
|
|
|
|
<ul class=errors>
|
|
|
|
{% for error in field.errors %}
|
|
|
|
<li>{{ error }}</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
</dd>
|
|
|
|
{% endmacro %}
|
|
|
|
<form method=post>
|
|
|
|
<dl>
|
|
|
|
{{ render_field(form.payment_to) }}
|
|
|
|
{{ render_field(form.description) }}
|
|
|
|
{{ render_field(form.sum) }}
|
|
|
|
{{ render_field(form.kid) }}
|
|
|
|
{{ render_field(form.date_due) }} YYYY-MM-DD
|
|
|
|
</dl>
|
|
|
|
<input type=submit value="Add">
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2019-04-26 06:22:43 +02:00
|
|
|
<table class="table">
|
|
|
|
<thead class="thead-light">
|
|
|
|
<tr>
|
|
|
|
<th scope="col">Payment to</th>
|
|
|
|
<th scope="col">Description</th>
|
2019-04-26 06:52:27 +02:00
|
|
|
<th scope="col" style="width: 120px">Sum</th>
|
2019-04-26 07:05:19 +02:00
|
|
|
<th scope="col" style="width: 220px">KID</th>
|
2019-04-26 06:52:27 +02:00
|
|
|
<th scope="col" style="width: 120px">Date Due</th>
|
|
|
|
<th scope="col" style="width: 150px">Payment status</th>
|
2019-04-26 06:22:43 +02:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for row in data %}
|
2019-04-26 06:52:27 +02:00
|
|
|
<!--<tr class="table-{{ 'success' if row[5] else 'danger' }}">-->
|
2019-04-26 06:22:43 +02:00
|
|
|
<tr>
|
|
|
|
<th>{{ row[0] }}</th>
|
|
|
|
<td>{{ row[1] }}</td>
|
|
|
|
<td>{{ row[2] }}</td>
|
|
|
|
<td>{{ row[3] }}</td>
|
|
|
|
<td>{{ row[4] }}</td>
|
2019-04-26 06:52:27 +02:00
|
|
|
<td style="background-color:{{ '#4F4' if row[5] else '#F44' }};"></td>
|
2019-04-26 06:22:43 +02:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endblock %}
|