47 lines
1.4 KiB
HTML
47 lines
1.4 KiB
HTML
{% 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 %} |