Update cancel URL handling in HTTP and timer function templates

- Modify header template to use explicit `cancel_url` parameter
- Add `cancel_url` to new timer and HTTP function templates
- Remove default URL fallback in header template
This commit is contained in:
Peter Stockings
2025-02-16 20:22:03 +11:00
parent e09437c7b8
commit aeb880ed0a
4 changed files with 6 additions and 5 deletions

View File

@@ -92,9 +92,8 @@
</div>
<!-- Cancel Button (right side) -->
<button class="group flex flex-col items-center text-gray-500 hover:text-blue-600"
hx-get="{{ cancel_url|default(url_for('dashboard_http_functions')) }}" hx-target="#container"
hx-swap="innerHTML" hx-push-url="true">
<button class="group flex flex-col items-center text-gray-500 hover:text-blue-600" hx-get="{{ cancel_url }}"
hx-target="#container" hx-swap="innerHTML" hx-push-url="true">
<div class="p-2 rounded-lg group-hover:bg-blue-50">
<svg class="w-6 h-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor">

View File

@@ -10,6 +10,7 @@ show_logs=False,
show_client=False,
show_link=False,
dashboardUrl=url_for('dashboard_http_functions'),
cancel_url=url_for('dashboard_http_functions'),
title='New HTTP Function')
}}