Page 549 - MDP2022-3
P. 549
placeholder="할일을 입력하세요." required>
</div>
<div class="col-12 col-sm-7 mt-2">
<!-- 날짜 -->
<input type="text" class="form-control" id="date" placeholder="기한을 선택해주세요."
required>
</div>
<div class="col-12 col-sm-5 mt-2">
<!-- 완료처리 -->
<button type="button" class="btn btn-primary" onclick="createTodo();">생성</button>
</div>
</div>
<div class="row mt-5">
<div class="col-12">
<h3> ●할일 목록</h3>
<table style="margin-top: 50px;" class="table table-striped">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">할일제목</th>
<th scope="col">기한</th>
<th scope="col">완료처리</th>
</tr>
</thead>
<tbody>
{% for todo in todos %}
{% if todo.status==1 %}
<tr>
<th scope="row"><del>◎</del></th>
<td><del>{{ todo.title}}</del></td>
<td><del>{{ todo.due }}</del></td>
<td><button type="button" class="btn btn-secondary"
onclick="deleteTodo({{ todo.id }})">삭제</button></td>
</tr>
{% else %}
<tr>
<th scope="row">◎</th>
<td>{{ todo.title }}</td>
<td>{{ todo.due }}</td>
<td><button type="button" class="btn btn-primary" onclick="doneTodo({{
todo.id }})">
완료</button></td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>