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:
@@ -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">
|
||||
|
||||
@@ -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')
|
||||
}}
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
{% block page %}
|
||||
|
||||
{{ render_partial('dashboard/http_functions/header.html', function_id=function_id,
|
||||
{{ render_partial('dashboard/http_functions/header.html',
|
||||
function_id=function_id,
|
||||
active_tab='edit',
|
||||
show_edit_form=True,
|
||||
show_logs=True,
|
||||
|
||||
@@ -9,7 +9,7 @@ show_refresh=False,
|
||||
show_logs=False,
|
||||
show_client=False,
|
||||
show_link=False,
|
||||
dashboardUrl=url_for('timer.overview'),
|
||||
cancel_url=url_for('timer.overview'),
|
||||
title='New Timer Function')
|
||||
}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user