From 8e1a5416151dbcf506f2435823362e21d85aed2d Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Mon, 22 Apr 2024 04:38:49 +0200 Subject: [PATCH] Minor fixes. --- plomtask/http.py | 3 +-- templates/day.html | 10 ---------- templates/process.html | 2 +- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/plomtask/http.py b/plomtask/http.py index d8ca8df..1009c1b 100644 --- a/plomtask/http.py +++ b/plomtask/http.py @@ -195,8 +195,7 @@ class TaskHandler(BaseHTTPRequestHandler): day = Day.by_id(self.conn, date, create=True) day.comment = self.form_data.get_str('comment') day.save(self.conn) - process_id = self.form_data.get_int_or_none('new_todo') - if process_id is not None: + for process_id in self.form_data.get_all_int('new_todo'): process = Process.by_id(self.conn, process_id) todo = Todo(None, process, False, day.date) todo.save(self.conn) diff --git a/templates/day.html b/templates/day.html index 8887f9a..b38d566 100644 --- a/templates/day.html +++ b/templates/day.html @@ -1,15 +1,5 @@ {% extends 'base.html' %} -{% macro todo_with_children(todo, indent) %} -
  • {% for i in range(indent) %}+{% endfor %} [{% if todo.is_done %}x{% else %} {% endif %}] {{todo.process.title.newest|e}} -{% for child in todo.children %} -{{ todo_with_children(child, indent+1) }} -{% endfor %} -{% for condition in todo.conditions %} -
  • {% for i in range(indent) %} {% endfor %}  <[{% if condition.is_active %}x{% else %} {% endif %}] {{condition.title.newest|e}} -{% endfor %} -{% endmacro %} - {% macro node_with_children(node, indent) %}
  • {% for i in range(indent) %}+{% endfor %} {% if node.is_todo %} diff --git a/templates/process.html b/templates/process.html index f8f7baf..85424fa 100644 --- a/templates/process.html +++ b/templates/process.html @@ -70,7 +70,7 @@ add condition: add enables: -

    conditions

    +

    disables

    {% for condition in process.disables %} -- 2.30.2