home · contact · privacy
Template layout and code improvements.
[plomtask] / templates / todo.html
index 41d894bb0ef6b5f47a58e04323c4902b404f7d1a..f62b0d1e1d3bba3e982533e3466a1eb5a16acb4e 100644 (file)
@@ -6,58 +6,50 @@
 {% block content %}
 <h3>Todo: {{todo.title_then|e}}</h3>
 <form action="todo?id={{todo.id_}}" method="POST">
-<table>
 
+<table class="edit_table">
 <tr>
 <th>day</th>
 <td><a href="day?date={{todo.date}}">{{todo.date}}</a></td>
 </tr>
-
 <tr>
 <th>process</th>
 <td><a href="process?id={{todo.process.id_}}">{{todo.process.title.newest|e}}</a></td>
 </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 placeholder={{todo.effort_then}} value={{todo.effort}} /></td>
 </tr>
-
 <tr>
 <th>comment</th>
-<td><input name="comment" value="{{todo.comment|e}}"/></td>
+<td><input name="comment" type="text" value="{{todo.comment|e}}"/></td>
 </tr>
-
 <tr>
 <th>calendarize</th>
 <td><input type="checkbox" name="calendarize" {% if todo.calendarize %}checked {% endif %}</td>
 </tr>
-
 <tr>
 <th>conditions</th>
-<td>{{ macros.simple_checkbox_table("condition", todo.conditions, "condition", "condition_candidates", historical=true) }}</td>
+<td>{{ macros.simple_checkbox_table("condition", todo.conditions, "condition", "condition_candidates") }}</td>
 </tr>
-
 <tr>
 <th>blockers</th>
-<td>{{ macros.simple_checkbox_table("blocker", todo.blockers, "condition", "condition_candidates", historical=true) }}</td>
+<td>{{ macros.simple_checkbox_table("blocker", todo.blockers, "condition", "condition_candidates") }}</td>
 </tr>
-
 <tr>
 <th>enables</th>
-<td>{{ macros.simple_checkbox_table("enables", todo.enables, "condition", "condition_candidates", historical=true) }}</td>
+<td>{{ macros.simple_checkbox_table("enables", todo.enables, "condition", "condition_candidates") }}</td>
 </tr>
-
 <tr>
 <th>disables</th>
-<td>{{ macros.simple_checkbox_table("disables", todo.disables, "condition", "condition_candidates", historical=true) }}</td>
+<td>{{ macros.simple_checkbox_table("disables", todo.disables, "condition", "condition_candidates") }}</td>
 </tr>
-
 <tr>
 <th>parents</th>
 <td>
 {% endfor %}
 </td>
 </tr>
-
 <tr>
 <th>children</th>
-<td>{{ macros.simple_checkbox_table("adopt", todo.children, "adopt", "todo_candidates", "adopt", true) }}</td>
+<td>{{ macros.simple_checkbox_table("adopt", todo.children, "todo", "todo_candidates", "adopt", true) }}<br />
+make: <input type="text" name="make" list="process_candidates" autocomplete="off" /></td>
 </tr>
-
 </table>
+
 {{ macros.edit_buttons() }}
 </form>
-
 {{ macros.datalist_of_titles("condition_candidates", condition_candidates) }}
-{{ macros.datalist_of_titles("todo_candidates", todo_candidates) }}
+{{ macros.datalist_of_titles("process_candidates", process_candidates) }}
+<datalist id="todo_candidates">
+{% for candidate in todo_candidates %}
+<option value="{{candidate.id_}}">{{candidate.title.newest|e}} {{candidate.comment|e}}</option>
+{% endfor %}
+</datalist>
 {% endblock %}