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.
34 lines
1.1 KiB
HTML
34 lines
1.1 KiB
HTML
2 years ago
|
{% extends 'base.html' %}
|
||
|
|
||
|
{% block content %}
|
||
|
<h1>{% block title %} Create a New Item {% endblock %}</h1>
|
||
|
|
||
|
<form method="post">
|
||
|
<div class="form-group">
|
||
|
<label for="content">Content</label>
|
||
|
<input type="text" name="content"
|
||
|
placeholder="Todo content" class="form-control"
|
||
|
value="{{ request.form['content'] }}"></input>
|
||
|
</div>
|
||
|
|
||
|
<div class="form-group">
|
||
|
<label for="list">List</label>
|
||
|
<select class="form-control" name="list">
|
||
|
{% for list in lists %}
|
||
|
{% if list['title'] == request.form['list'] %}
|
||
|
<option value="{{ request.form['list'] }}" selected>
|
||
|
{{ request.form['list'] }}
|
||
|
</option>
|
||
|
{% else %}
|
||
|
<option value="{{ list['title'] }}">
|
||
|
{{ list['title'] }}
|
||
|
</option>
|
||
|
{% endif %}
|
||
|
{% endfor %}
|
||
|
</select>
|
||
|
</div>
|
||
|
<div class="form-group">
|
||
|
<button type="submit" class="btn btn-primary">Submit</button>
|
||
|
</div>
|
||
|
</form>
|
||
|
{% endblock %}
|