feat(11-01): UIE-02 — dedicated Add Printer page at GET /printers/new

- Create imptune/templates/printers_new.html: full page extending base.html
  with plain <form action="/printers" method="post"> (no HTMX, browser follows 303)
  and inline driver upload sub-form
- Update imptune/templates/printers.html: remove inline Add Printer form,
  add <a href="/printers/new" role="button">Add Printer</a> link
- Add GET /printers/new route in imptune/api/pages.py (placed before /{printer_id})
- Change POST /printers to always return RedirectResponse(url='/printers', status_code=303)
- Update existing POST /printers tests to assert 303 + follow_redirects=False
- Update test_printer_form.py to check /printers/new instead of /printers (UIE-02 arch)
- UIE-02 tests GREEN; UIE-01/03 scaffolds remain RED (expected — not yet implemented)
This commit is contained in:
2026-04-15 11:03:41 +02:00
parent a02df7d292
commit 3d2cdc4e77
6 changed files with 151 additions and 42 deletions
+1 -4
View File
@@ -3,10 +3,7 @@
{% block content %}
<h1>Printers</h1>
<section>
<h2>Add Printer</h2>
{% include "partials/printer_form.html" %}
</section>
<p><a href="/printers/new" role="button">Add Printer</a></p>
<section>
<h2>Printer Library</h2>