83 lines
2.3 KiB
HTML
83 lines
2.3 KiB
HTML
{% set title = "lnk_bills" %}
|
|
|
|
{% extends "layout/dash.html" %}
|
|
|
|
{% block content %}
|
|
|
|
<style id="grid">
|
|
.container.module:nth-child(1n) {
|
|
grid-area: 1 / 1 / 5 / 5;
|
|
}
|
|
</style>
|
|
|
|
<div class="container module">
|
|
|
|
<button type="button" class="btn btn-primary" style="margin:10px;" data-toggle="modal" data-target="#myModal">{{ locale(LANG, "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><label for="{{ field.label.field_id }}">{{ locale(LANG, field.label.text) }}</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) }}
|
|
</dl>
|
|
<input type=submit value="{{ locale(LANG, 'add') }}">
|
|
</form>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{ locale(LANG, "close") }}</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<table class="table">
|
|
<thead class="thead-light">
|
|
<tr>
|
|
<th scope="col">{{ locale(LANG, "lbl_to") }}</th>
|
|
<th scope="col">{{ locale(LANG, "lbl_desc") }}</th>
|
|
<th scope="col" style="width: 120px">{{ locale(LANG, "lbl_sum") }}</th>
|
|
<th scope="col" style="width: 220px">{{ locale(LANG, "lbl_id") }}</th>
|
|
<th scope="col" style="width: 120px">{{ locale(LANG, "lbl_date") }}</th>
|
|
<th scope="col" style="width: 150px">{{ locale(LANG, "lbl_status") }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for row in data %}
|
|
<!--<tr class="table-{{ 'success' if row[5] else 'danger' }}">-->
|
|
<tr>
|
|
<th>{{ row[0] }}</th>
|
|
<td>{{ row[1] }}</td>
|
|
<td>{{ row[2] }}</td>
|
|
<td>{{ row[3] }}</td>
|
|
<td>{{ row[4] }}</td>
|
|
<td style="background-color:{{ '#4F4' if row[5] else '#F44' }};"></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
|
|
{% endblock %} |