Files
fitguide/app/templates/admin/_clamp_connection_row_edit.html
2026-07-02 13:35:58 -03:00

30 lines
1.5 KiB
HTML

<tr id="clamp-connection-{{ cc.id }}">
<td colspan="6">
<form hx-post="/admin/clamp-connections/{{ cc.id }}"
hx-target="#clamp-connection-{{ cc.id }}"
hx-swap="outerHTML"
class="inline-edit">
<span class="muted">#{{ cc.id }}</span>
<label>Min (mm) <input type="number" name="min_mm" step="0.001" min="0"
value="{{ cc.min_mm if cc.min_mm is not none else '' }}"
placeholder="optional"></label>
<label>Max (mm) <input type="number" name="max_mm" step="0.001" min="0"
value="{{ cc.max_mm if cc.max_mm is not none else '' }}"
placeholder="optional"></label>
<label>Min (in) <input type="number" name="min_in" step="0.0001" min="0"
value="{{ cc.min_in if cc.min_in is not none else '' }}"
placeholder="optional"></label>
<label>Max (in) <input type="number" name="max_in" step="0.0001" min="0"
value="{{ cc.max_in if cc.max_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/clamp-connections/{{ cc.id }}/row"
hx-target="#clamp-connection-{{ cc.id }}"
hx-swap="outerHTML">Cancel</button>
</div>
</form>
</td>
</tr>