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 %}