xppl/app/templates/add_book.html

49 lines
1.6 KiB
HTML
Raw Normal View History

2018-05-20 00:10:01 +02:00
{% extends 'base.html' %}
{% block main %}
<div class="container">
<h1 class="page-header">Add Book</h1>
{% with messages = get_flashed_messages() %}
{% if messages %}
<div class="alert alert-danger">
<ul>
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endwith %}
<form method="POST" action="{{ url_for('add_book') }}" enctype=multipart/form-data>
{{ form.csrf_token }}
<div class="form-group">{{ form.title.label }} {{ form.title(size=20, class="form-control") }}</div>
2018-05-23 14:12:24 +02:00
<br>
<div data-toggle="fieldset" id="phone-fieldset">
{{ form.author.label }} <button type="button" data-toggle="fieldset-add-row"
data-target="#phone-fieldset">+</button>
<table>
<tr>
<th></th>
<th></th>
</tr>
{% for author in form.author %}
<tr data-toggle="fieldset-entry">
<td>{{ author.author_name }}</td>
<td><button type="button" data-toggle="fieldset-remove-row" id="phone-{{loop.index0}}-remove">-</button></td>
</tr>
{% endfor %}
</table>
</div>
<br>
2018-05-27 22:11:35 +02:00
<div class="form-group">{{ form.category.label }} {{ form.category(size=20, class="form-control") }}</div>
2018-05-31 20:06:13 +02:00
<br>
<div class="form-group">{{ form.year_published.label }} {{ form.year_published(size=4, class="form-control") }}</div>
<br>
2018-05-20 00:10:01 +02:00
{{ form.file }}
2018-05-31 18:26:22 +02:00
{{ form.upload }}
{{ form.wish }}
2018-05-20 00:10:01 +02:00
</form>
</div>
{% endblock %}