Skip to content

Commit bbc7e25

Browse files
TemplateSyntaxError bugfix onsubmit button.
1 parent 6656cfb commit bbc7e25

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

dockflare/app/templates/status_page.html

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,14 +226,13 @@ <h2 class="card-title text-2xl sm:text-3xl border-b border-base-300 pb-3 mb-6">
226226
{% endif %}
227227
</td>
228228
<td class="p-3 whitespace-nowrap">
229-
<a href="{{ protocol }}://{{ details.hostname_for_dns }}{{ details.path if details.path else '' }}" target="_blank" rel="noopener noreferrer" title="Open {{ protocol }}://{{ details.hostname_for_dns }}{{ details.path if details.path else '' }}" class="link link-hover link-primary text-sm">
229+
<a href="{{ protocol }}://{{ details.hostname_for_dns }}{% if details.path %}{{ details.path }}{% endif %}" target="_blank" rel="noopener noreferrer" title="Open {{ protocol }}://{{ details.hostname_for_dns }}{% if details.path %}{{ details.path }}{% endif %}" class="link link-hover link-primary text-sm">
230230
{{ details.hostname_for_dns }}
231231
</a>
232232
{% if details.hostname_for_dns and details.hostname_for_dns.startswith('*.') %}
233233
<span class="badge badge-info badge-xs ml-2">wildcard</span>
234234
{% endif %}
235235
</td>
236-
{# Path Column (already correct) #}
237236
<td class="p-3 whitespace-nowrap">
238237
{% if details.path and details.path.strip() %}
239238
<code class="text-xs opacity-70">{{ details.path }}</code>
@@ -303,7 +302,7 @@ <h2 class="card-title text-2xl sm:text-3xl border-b border-base-300 pb-3 mb-6">
303302
</div>
304303
{% if details.access_policy_ui_override %}
305304
<form action="{{ url_for('web.revert_access_policy_to_labels', hostname=hostname) }}" method="POST"
306-
onsubmit="return confirm('Are you sure you want to revert the Access Policy for {{ hostname }}? {% if details.source == "manual" %}The current UI-set policy will be removed, and it will become public or use a TLD policy if one exists.{% else %}The current UI-set policy will be removed, and it will be managed by its container labels.{% endif %}');"
305+
onsubmit="return confirm('Are you sure you want to revert the Access Policy for {{ details.hostname_for_dns }}{% if details.path %}{{ details.path }}{% endif %}? {% if details.source == "manual" %}The current UI-set policy will be removed, and it will become public or use a TLD policy if one exists.{% else %}The current UI-set policy will be removed, and it will be managed by its container labels.{% endif %}');"
307306
class="protocol-aware-form inline-block">
308307
<button type="submit" class="btn btn-xs btn-warning btn-outline" title="Revert to Label/Default Policy">Revert</button>
309308
</form>
@@ -324,12 +323,11 @@ <h2 class="card-title text-2xl sm:text-3xl border-b border-base-300 pb-3 mb-6">
324323
</td>
325324
<td class="p-3 whitespace-nowrap text-sm" style="min-width: 80px;">
326325
{% if details.source == 'manual' %}
327-
<form action="{{ url_for('web.ui_delete_manual_rule_route', rule_key_from_url=hostname) }}" method="post" onsubmit="return confirm('Are you sure you want to delete the manual rule for {{ details.hostname_for_dns }}{{ details.path if details.path else \'\' }}?');" class="protocol-aware-form">
326+
<form action="{{ url_for('web.ui_delete_manual_rule_route', rule_key_from_url=hostname) }}" method="post" onsubmit="return confirm('Are you sure you want to delete the manual rule for {{ details.hostname_for_dns }}{% if details.path %}{{ details.path }}{% endif %}?');" class="protocol-aware-form">
328327
<button type="submit" class="btn btn-xs btn-error btn-outline">Delete</button>
329328
</form>
330329
{% else %}
331-
{# Force delete for Docker rules - uses 'hostname' which is the rule_key #}
332-
<form action="{{ url_for('web.force_delete_rule_route', hostname=hostname) }}" method="post" onsubmit="return confirm('Are you sure you want to force delete the rule and DNS record for {{ details.hostname_for_dns }}{{ details.path if details.path else \'\' }} immediately? This bypasses the grace period.');" class="protocol-aware-form">
330+
<form action="{{ url_for('web.force_delete_rule_route', hostname=hostname) }}" method="post" onsubmit="return confirm('Are you sure you want to force delete the rule and DNS record for {{ details.hostname_for_dns }}{% if details.path %}{{ details.path }}{% endif %} immediately? This bypasses the grace period.');" class="protocol-aware-form">
333331
<button type="submit" class="btn btn-xs btn-error btn-outline" {{ 'disabled' if not docker_available else '' }}>Delete</button>
334332
</form>
335333
{% endif %}

0 commit comments

Comments
 (0)