Allow users to edit checkins
This commit is contained in:
19
app/templates/partials/checkin_edit_row.html
Normal file
19
app/templates/partials/checkin_edit_row.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<tr id="checkin-{{ c.id }}" class="editing-row">
|
||||
<td>{{ c.checked_in_at | sydney }}</td>
|
||||
<td>
|
||||
<input type="number" name="weight_kg" class="edit-input" step="0.1" value="{{ '%.1f' % (c.weight_kg | float) }}"
|
||||
required autofocus>
|
||||
</td>
|
||||
<td style="color: var(--text-muted); font-size: 0.8rem;">auto</td>
|
||||
<td>
|
||||
<input type="text" name="notes" class="edit-input" placeholder="Notes" value="{{ c.notes or '' }}">
|
||||
</td>
|
||||
<td>
|
||||
<div class="checkin-actions">
|
||||
<button class="btn-icon btn-icon-success" hx-put="/checkin/{{ c.id }}" hx-target="#checkin-{{ c.id }}"
|
||||
hx-swap="outerHTML" hx-include="closest tr" title="Save">✓</button>
|
||||
<button class="btn-icon" hx-get="/checkin/{{ c.id }}/view" hx-target="#checkin-{{ c.id }}"
|
||||
hx-swap="outerHTML" title="Cancel">✕</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
Reference in New Issue
Block a user