xppl/app/templates/add_stack.html
2018-06-11 17:57:22 +02:00

51 lines
1.0 KiB
HTML

{% extends 'base.html' %}
{% block main %}
<div class="container">
{% from "_formhelpers.html" import render_field %}
<h1 class="page-header">Add Stack</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_stack') }}" enctype=multipart/form-data>
{{form.hidden_tag()}}
<br>
{{ render_field(form.stack_name)}}
<div style="width: 40%;">
Add a nice description: {{ form.stack_description(size=90, class="form-control") }}
</div>
{{ render_field(form.stack_author)}}
<br>
<button type="submit" class='button'>Create</button>
</form>
<br>
<hr>
<br>
<h1> Stacks currently in the library </h1>
<ul>
{% for stack in stacks %}
<li> <a href="stacks/tab/{{ stack.id }}">
{{ stack.stack_name }}
</a></td>
{% endfor %}
</ul>
</div>
{% endblock %}