web synchronized with the new changes

This commit is contained in:
Priec
2026-08-09 16:30:27 +02:00
parent e66b025188
commit fd551ef7fb
44 changed files with 1215 additions and 88 deletions

View File

@@ -27,7 +27,7 @@
{%- for profile in page.catalog.profiles %}{% for table in profile.tables %}<option value="{{ table }}"></option>{% endfor %}{% endfor -%}
</datalist>
<div class="form-actions">
<a href="/admin">Cancel</a>
<a href="/">Cancel</a>
<button type="submit">Download CSV</button>
</div>
</form>

View File

@@ -12,12 +12,7 @@
hx-disabled-elt="button[type=submit]">
<div class="form-grid">
<label>Profile
<select name="profile_name" required>
<option value="">Choose a profile</option>
{% for profile in page.catalog.profiles %}
<option value="{{ profile.name }}" {% if page.form.profile_name == profile.name %}selected{% endif %}>{{ profile.name }}</option>
{% endfor %}
</select>
<input name="profile_name" list="import-profiles" value="{{ page.form.profile_name }}" required placeholder="billing">
</label>
<label>Target tables<input name="table_names" list="import-tables" value="{{ page.form.table_names }}" required placeholder="invoices, customers"></label>
<label class="wide">CSV file
@@ -26,6 +21,9 @@
</label>
<label class="wide">CSV data<textarea id="csv-data" name="csv_data" rows="14" required>{{ page.form.csv_data }}</textarea></label>
</div>
<datalist id="import-profiles">
{% for profile in page.catalog.profiles %}<option value="{{ profile.name }}"></option>{% endfor %}
</datalist>
<datalist id="import-tables">
{%- for profile in page.catalog.profiles %}{% for table in profile.tables %}<option value="{{ table }}"></option>{% endfor %}{% endfor -%}
</datalist>
@@ -33,7 +31,7 @@
{%- if let Some(message) = page.error %}{% call alert::error("Could not import CSV", message) %}{% endcall %}{% endif -%}
</div>
<div class="form-actions">
<a href="/admin">Cancel</a>
<a href="/">Cancel</a>
<button type="submit">Import rows</button>
</div>
</form>