You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
923 B
HTML
29 lines
923 B
HTML
{% 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>
|
|
<div class="form-group">{{ form.author.label }} {{ form.author(size=20, class="form-control") }}</div>
|
|
<div class="form-group">{{ form.tag.label }} {{ form.tag(size=20, class="form-control") }}</div>
|
|
|
|
{{ form.file }}
|
|
<button type="submit" class="btn btn-primary">Upload</button>
|
|
</form>
|
|
|
|
</div>
|
|
{% endblock %}
|