merge: fix affiliate form grid layout
This commit is contained in:
@@ -36,16 +36,18 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div style="display:grid;grid-template-columns:1fr 380px;gap:2rem;align-items:start" class="affiliate-form-grid">
|
{# HTMX preview trigger — outside the grid so it takes no layout space #}
|
||||||
|
<div style="display:none"
|
||||||
{# ── Left: form ── #}
|
hx-post="{{ url_for('admin.affiliate_preview') }}"
|
||||||
{# Invisible trigger: fires preview on page load + any input change #}
|
|
||||||
<div hx-post="{{ url_for('admin.affiliate_preview') }}"
|
|
||||||
hx-target="#product-preview"
|
hx-target="#product-preview"
|
||||||
hx-trigger="load, input from:#affiliate-form delay:600ms"
|
hx-trigger="load, input from:#affiliate-form delay:600ms"
|
||||||
hx-include="#affiliate-form"
|
hx-include="#affiliate-form"
|
||||||
hx-push-url="false">
|
hx-push-url="false">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div style="display:grid;grid-template-columns:1fr 380px;gap:2rem;align-items:start" class="affiliate-form-grid">
|
||||||
|
|
||||||
|
{# ── Left: form ── #}
|
||||||
<form method="post" id="affiliate-form"
|
<form method="post" id="affiliate-form"
|
||||||
action="{% if editing %}{{ url_for('admin.affiliate_edit', product_id=product_id) }}{% else %}{{ url_for('admin.affiliate_new') }}{% endif %}">
|
action="{% if editing %}{{ url_for('admin.affiliate_edit', product_id=product_id) }}{% else %}{{ url_for('admin.affiliate_new') }}{% endif %}">
|
||||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||||
|
|||||||
Reference in New Issue
Block a user