From 1a9aa24ebff5bdbc503b15c5546e261acd766427 Mon Sep 17 00:00:00 2001 From: Stephan Kerkman Date: Sat, 30 May 2026 21:36:54 +0200 Subject: [PATCH] fix: use hx-swap=innerHTML so #photo-gallery id survives HTMX swaps --- .../plants/partials/photo_gallery.html | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/plants/templates/plants/partials/photo_gallery.html b/plants/templates/plants/partials/photo_gallery.html index b7f4e62..69a8363 100644 --- a/plants/templates/plants/partials/photo_gallery.html +++ b/plants/templates/plants/partials/photo_gallery.html @@ -13,7 +13,7 @@ {% if not photo.is_thumbnail %}
+ hx-target="#photo-gallery" hx-swap="innerHTML"> {% csrf_token %}
@@ -22,7 +22,7 @@ {% endif %}
+ hx-target="#photo-gallery" hx-swap="innerHTML"> {% csrf_token %}
@@ -34,7 +34,7 @@ {% endwith %}
{% csrf_token %}
@@ -45,15 +45,3 @@
- -{% if request.htmx %} -
-{% if plant.species and plant.species.api_image_url %} -{{ plant.species.common_name }} -{% elif plant.thumbnail_url %} -{{ plant.name }} -{% else %} -
🌿
-{% endif %} -
-{% endif %}