From 2a876a20baed4bad95f86c31a51f28f72cb5a96b Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Sat, 29 Oct 2022 14:24:09 +0100 Subject: [PATCH] Swap modals with innerHTML --- core/templates/partials/account-list.html | 1 + core/templates/partials/callback-list.html | 3 ++- core/templates/partials/hook-list.html | 1 + core/templates/partials/position-list.html | 1 + core/templates/partials/strategy-list.html | 1 + core/templates/partials/trade-list.html | 1 + 6 files changed, 7 insertions(+), 1 deletion(-) diff --git a/core/templates/partials/account-list.html b/core/templates/partials/account-list.html index 59c1123..62af3d8 100644 --- a/core/templates/partials/account-list.html +++ b/core/templates/partials/account-list.html @@ -79,6 +79,7 @@ hx-get="{% url 'account_info' type=type pk=item.id %}" hx-trigger="click" hx-target="#{{ type }}s-here" + hx-swap="innerHTML" class="button is-success"> diff --git a/core/templates/partials/callback-list.html b/core/templates/partials/callback-list.html index af91fd5..6a708c1 100644 --- a/core/templates/partials/callback-list.html +++ b/core/templates/partials/callback-list.html @@ -25,7 +25,8 @@ hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' hx-get="{% url 'hook_update' type=type pk=item.hook.id %}" hx-trigger="click" - hx-target="#{{ type }}s-here">{{ item.hook.name }} + hx-target="#{{ type }}s-here" + hx-swap="innerHTML">{{ item.hook.name }} {{ item.title }} diff --git a/core/templates/partials/hook-list.html b/core/templates/partials/hook-list.html index 5da0b40..fb555ad 100644 --- a/core/templates/partials/hook-list.html +++ b/core/templates/partials/hook-list.html @@ -69,6 +69,7 @@ hx-get="{% url 'callbacks' type=type pk=item.id %}" hx-trigger="click" hx-target="#{{ type }}s-here" + hx-swap="innerHTML" class="button is-success"> diff --git a/core/templates/partials/position-list.html b/core/templates/partials/position-list.html index 4bcb1af..27f61a7 100644 --- a/core/templates/partials/position-list.html +++ b/core/templates/partials/position-list.html @@ -67,6 +67,7 @@ hx-get="{% url 'position_action' type=type account_id=item.account_id asset_id=item.asset_id %}" hx-trigger="click" hx-target="#{{ type }}s-here" + hx-swap="innerHTML" class="button is-success"> diff --git a/core/templates/partials/strategy-list.html b/core/templates/partials/strategy-list.html index 40d00df..da47e74 100644 --- a/core/templates/partials/strategy-list.html +++ b/core/templates/partials/strategy-list.html @@ -81,6 +81,7 @@ hx-get="#" hx-trigger="click" hx-target="#{{ type }}s-here" + hx-swap="innerHTML" class="button is-success"> diff --git a/core/templates/partials/trade-list.html b/core/templates/partials/trade-list.html index e126409..32712ac 100644 --- a/core/templates/partials/trade-list.html +++ b/core/templates/partials/trade-list.html @@ -74,6 +74,7 @@ hx-get="#" hx-trigger="click" hx-target="#{{ type }}s-here" + hx-swap="innerHTML" class="button is-success">