Skip to content

Commit 7befe96

Browse files
committed
Fix HTML code rendering
1 parent 4fda8cc commit 7befe96

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

templates/index.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ <h1>Endless Task List App using Flask</h1>
6161
name="repeat_interval"
6262
min="1"
6363
step="1"
64+
value="1"
6465
/><br />
6566
Repeat interval:
6667
<select id="repeat_often" name="repeat_often">
@@ -82,8 +83,13 @@ <h1>Endless Task List App using Flask</h1>
8283
Medium {% elif task.priority == 3 %} High {% endif %}<br />
8384
Difficulty: {% if task.difficulty == 1 %} Easy {% elif task.difficulty
8485
== 2 %} Medium {% elif task.difficulty == 3 %} Hard {% endif %}<br />
85-
Repeat: {% if task.difficulty == 3 %} Month {% elif task.difficulty == 4
86-
%} Year {% elif task.difficulty == 5 %} Once {% endif %}<br />
86+
Repeat: {% if task.repeat_often != 5 %} {{ task.repeat_interval }} {%
87+
endif %} {% if task.repeat_often == 1 %} Day{% if task.repeat_interval >
88+
1 %}s {% endif %}{% elif task.repeat_often == 2 %} Week{% if
89+
task.repeat_interval > 1 %}s {% endif %}{% elif task.repeat_often == 3
90+
%} Month{% if task.repeat_interval > 1 %}s {% endif %}{% elif
91+
task.repeat_often == 4 %} Year{% if task.repeat_interval > 1 %}s {%
92+
endif %}{% elif task.repeat_often == 5 %} Once {% endif %}<br />
8793
{% if not task.completed %}<!--show complete button if task is not completed-->
8894
<a href="/complete_task/{{ task.id }}">Complete</a>
8995
{% endif %}

0 commit comments

Comments
 (0)