Files
yaric359/templates/pages/queries/phones.html
2019-01-08 16:09:15 +05:00

47 lines
1.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends 'base.html' %}
{% block content %}
<div class="container">
<h3>Добавить телефон</h3>
<form method="get">
<div class="form-group">
<label for="ent_id">Телефон для</label>
<select class="form-control" id="ent_id" name="ent_id" required>
{% for item in enterprises %}
<option value="{{ item.id }}">Предприятие "{{ item.contact_info.name }}"</option>
{% endfor %}
</select>
</div>
<div class="form-group">
<label for="date">На дату</label>
<input class="form-control" id="date" name="date" required type="date">
</div>
<button type="submit" class="btn btn-primary">Отправить</button>
</form>
{% if res %}
<table class="table">
<thead>
<tr>
<th scope="col">
Имя
</th>
<th scope="col">
Телефон
</th>
</tr>
</thead>
<tbody>
{% for item in res %}
<tr>
<th scope="row">
{{ item[0] }}
</th>
<td>
{{ item[1] }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</div>
{% endblock %}