Adding Manufacturers and ScopeModels

This commit is contained in:
Ian Roddis committed 2026-06-25 10:46:39 -03:00
1 parent 9111117404
commit b7ad517174
24 files changed
+822 -2

No files matched your search

@@ -0,0 +1,26 @@
<tr id="scope-model-{{ sm.id }}">
<td colspan="5">
<form hx-post="/admin/scope-models/{{ sm.id }}"
hx-target="#scope-model-{{ sm.id }}"
hx-swap="outerHTML"
class="inline-edit">
<span class="muted">#{{ sm.id }}</span>
<label>Name <input type="text" name="name" value="{{ sm.name }}" required></label>
<label>Manufacturer
<select name="manufacturer_id" required>
{% for mfr in manufacturers %}
<option value="{{ mfr.id }}" {% if mfr.id == sm.manufacturer_id %}selected{% endif %}>{{ mfr.name }}</option>
{% endfor %}
</select>
</label>
<label>Product page URL <input type="url" name="url" value="{{ sm.url if sm.url is not none else '' }}" placeholder="optional"></label>
<div class="row-actions">
<button type="submit" class="btn btn-primary">Save</button>
<button type="button" class="btn btn-ghost"
hx-get="/admin/scope-models/{{ sm.id }}/row"
hx-target="#scope-model-{{ sm.id }}"
hx-swap="outerHTML">Cancel</button>
</div>
</form>
</td>
</tr>