From 189cb82af724ca874fe5b85273359359879916e1 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Thu, 18 Jul 2024 04:56:30 +0200
Subject: [PATCH] In GET/POST /todo, remove unnecessary node ID differentiation
 in previous "fill_for_" keys.

---
 plomtask/http.py    | 4 ++--
 templates/todo.html | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/plomtask/http.py b/plomtask/http.py
index 3d8508c..f61a9f1 100644
--- a/plomtask/http.py
+++ b/plomtask/http.py
@@ -631,7 +631,7 @@ class TaskHandler(BaseHTTPRequestHandler):
         adopted_child_ids = self._form_data.get_all_int('adopt')
         processes_to_make_full = self._form_data.get_all_int('make_full')
         processes_to_make_empty = self._form_data.get_all_int('make_empty')
-        fill_fors = self._form_data.get_first_strings_starting('fill_for_')
+        step_fillers = self._form_data.get_all_str('step_filler')
         with_effort_post = True
         try:
             effort = self._form_data.get_float_or_none('effort')
@@ -644,7 +644,7 @@ class TaskHandler(BaseHTTPRequestHandler):
         is_done = len(self._form_data.get_all_str('done')) > 0
         calendarize = len(self._form_data.get_all_str('calendarize')) > 0
         comment = self._form_data.get_str('comment', ignore_strict=True)
-        for v in fill_fors.values():
+        for v in step_fillers:
             target_id: int
             to_int = v
             for prefix in [p for p in ['make_empty_', 'make_full_']
diff --git a/templates/todo.html b/templates/todo.html
index 45e247f..732f788 100644
--- a/templates/todo.html
+++ b/templates/todo.html
@@ -23,7 +23,7 @@ select{ font-size: 0.5em; margin: 0; padding: 0; }
 {% else %}
 {{item.process.title.newest|e}}
 {% if indent == 0 %}
-· fill: <select name="fill_for_{{item.node_id}}">
+· fill: <select name="step_filler">
 <option value="ignore">--</option>
 <option value="make_empty_{{item.process.id_}}">make empty</option>
 <option value="make_full_{{item.process.id_}}">make full</option>
-- 
2.30.2