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.
53 lines
1.6 KiB
HTML
53 lines
1.6 KiB
HTML
{% extends 'base.html' %}
|
|
|
|
{% block content %}
|
|
|
|
<h1>{% block title %} Edit an Item {% endblock %}</h1>
|
|
|
|
<form method="post">
|
|
|
|
{% if current_topics %}
|
|
<div class="topics">
|
|
{% for topic in current_topics %}
|
|
<span class="topic-tag">
|
|
{{ topic }}
|
|
</span>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
|
|
<div class="form-group">
|
|
<label for="content">Content</label>
|
|
<input type="text" name="content"
|
|
placeholder="Todo content" class="form-control"
|
|
value="{{ todo['content'] or request.form['content'] }}"></input>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="cat">category</label>
|
|
<select class="form-control" name="cat">
|
|
{% for cat in categories %}
|
|
{% if cat['category_name'] == request.form['cat'] %}
|
|
<option value="{{ request.form['cat'] }}" selected>
|
|
{{ request.form['cat'] }}
|
|
</option>
|
|
|
|
{% elif cat['category_name'] == todo['category_name'] %}
|
|
<option value="{{ todo['category_name'] }}" selected>
|
|
{{ todo['category_name'] }}
|
|
</option>
|
|
|
|
{% else %}
|
|
<option value="{{ cat['category_name'] }}">
|
|
{{ cat['category_name'] }}
|
|
</option>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div class="form-group">
|
|
<button type="submit" class="btn btn-primary">Submit</button>
|
|
</div>
|
|
</form>
|
|
{% endblock %} |