From 6bd7a4306a6e8effb06abf148ecb1cb05552dbca Mon Sep 17 00:00:00 2001 From: EiSiMo Date: Tue, 21 Apr 2026 18:43:17 +0200 Subject: [PATCH] wohnungen actions: keep label text, disable both buttons while running MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Showing "läuft…" inside the Bewerben button duplicated the "läuft…" chip beside the address. Drop the text swap; keep the original labels "Bewerben" / "Ablehnen", just disable + grey both buttons (the existing .btn[disabled] styling handles that) while finished_at is null. On success, both buttons continue to hide — only the "beworben" chip remains. Co-Authored-By: Claude Opus 4.7 (1M context) --- web/templates/_wohnungen_body.html | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/web/templates/_wohnungen_body.html b/web/templates/_wohnungen_body.html index 09c641d..2c3cef9 100644 --- a/web/templates/_wohnungen_body.html +++ b/web/templates/_wohnungen_body.html @@ -146,8 +146,10 @@
- {% if apply_allowed and not (item.last and item.last.success == 1) %} {% set is_running = item.last and item.last.finished_at is none %} + {% set is_success = item.last and item.last.success == 1 %} + {% if not is_success %} + {% if apply_allowed %}
- {% if is_running %}läuft…{% else %}Bewerben{% endif %} + hx-on::before-request="this.disabled=true"> + Bewerben {% if partner and f.id in partner.applied_flat_ids %} {% endif %} - {% if not (item.last and item.last.success == 1) %} + hx-post="/actions/reject" hx-target="#wohnungen-body" hx-swap="outerHTML" + hx-disabled-elt="find button"> {% if partner and f.id in partner.rejected_flat_ids %}