Files
skeleton-api/app/templates/admin/_unc_thread_row_edit.html
T

28 lines
1.2 KiB
HTML

<tr id="unc-thread-{{ t.id }}">
<td colspan="6">
<form hx-post="/admin/unc-threads/{{ t.id }}"
hx-target="#unc-thread-{{ t.id }}"
hx-swap="outerHTML"
class="inline-edit">
<span class="muted">#{{ t.id }}</span>
<label>Diameter <input type="text" name="diameter_fraction" value="{{ t.diameter_fraction }}" required></label>
<label>TPI <input type="number" name="tpi" min="1" step="1" value="{{ t.tpi }}" required></label>
<label>Series
<select name="series">
{% for s in series_options %}
<option value="{{ s.value }}" {{ "selected" if s == t.series }}>{{ s.value }}</option>
{% endfor %}
</select>
</label>
<label>Depth (in) <input type="number" name="depth_in" step="0.001" min="0" value="{{ t.depth_in if t.depth_in 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/unc-threads/{{ t.id }}/row"
hx-target="#unc-thread-{{ t.id }}"
hx-swap="outerHTML">Cancel</button>
</div>
</form>
</td>
</tr>