Compare commits
4 Commits
8000d11872
...
2ff60e02e9
Author | SHA1 | Date |
---|---|---|
grgr | 2ff60e02e9 | 2 years ago |
grgr | 9aa6f5ca0b | 2 years ago |
grgr | f2728ed22e | 2 years ago |
grgr | bb0501a456 | 2 years ago |
Binary file not shown.
Binary file not shown.
@ -0,0 +1,41 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>{% block title %} Edit an 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="{{ todo['content'] or 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>
|
||||
|
||||
{% elif list['title'] == todo['title'] %}
|
||||
<option value="{{ todo['title'] }}" selected>
|
||||
{{ todo['title'] }}
|
||||
</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 %}
|
Loading…
Reference in New Issue