todo.set_blockers(self.conn, self.form_data.get_all_int('blocker'))
todo.set_enables(self.conn, self.form_data.get_all_int('enables'))
todo.set_disables(self.conn, self.form_data.get_all_int('disables'))
- if len(self.form_data.get_all_str('done')) > 0 != todo.is_done:
- todo.is_done = len(self.form_data.get_all_str('done')) > 0
+ todo.is_done = len(self.form_data.get_all_str('done')) > 0
todo.calendarize = len(self.form_data.get_all_str('calendarize')) > 0
todo.comment = self.form_data.get_str('comment', ignore_strict=True)
todo.save(self.conn)
</tr>
<tr>
<th>done</th>
-<td><input type="checkbox" name="done" {% if todo.is_done %}checked {% endif %} {% if not todo.is_doable %}disabled {% endif %}/><br /></td>
+<td><input type="checkbox" name="done" {% if todo.is_done %}checked {% endif %} {% if not todo.is_doable %}disabled {% endif %}/>
+{% if not todo.is_doable and todo.is_done %}<input type="hidden" name="done" value="1" />{% endif %}
+</td>
</tr>
<tr>
<th>effort</th>
-<td><input type="number" name="effort" step=0.1 size=5 placeholder={{todo.effort_then}} value={{todo.effort}} /><br /></td>
+<td><input type="number" name="effort" step=0.1 size=5 placeholder={{todo.effort_then}} value={{todo.effort}} /></td>
</tr>
<tr>
<th>comment</th>