27 lines
1.1 KiB
HTML
27 lines
1.1 KiB
HTML
<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>
|