Rolodex UX: add /rolodex/{id}/edit route, prefill support for new form, fix edit links, and improve empty state guidance. Also fix header width lints in template.
This commit is contained in:
@@ -11,12 +11,9 @@
|
||||
</a>
|
||||
<h2 class="mb-0">Client</h2>
|
||||
<div class="ms-auto">
|
||||
<a class="btn btn-sm btn-outline-primary" href="/rolodex/{{ client.id }}/edit" onclick="event.preventDefault(); document.getElementById('editFormLink').submit();">
|
||||
<a class="btn btn-sm btn-outline-primary" href="/rolodex/{{ client.id }}/edit">
|
||||
<i class="bi bi-pencil-square me-1"></i>Edit
|
||||
</a>
|
||||
<form id="editFormLink" method="get" action="/rolodex/new" class="d-none">
|
||||
<input type="hidden" name="_" value="1">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -57,12 +54,9 @@
|
||||
</div>
|
||||
|
||||
<div class="d-flex gap-2">
|
||||
<a class="btn btn-primary" href="/rolodex/new" onclick="event.preventDefault(); document.getElementById('editClientForm').submit();">
|
||||
<a class="btn btn-primary" href="/rolodex/{{ client.id }}/edit">
|
||||
<i class="bi bi-pencil-square me-1"></i>Edit Client
|
||||
</a>
|
||||
<form id="editClientForm" method="get" action="/rolodex/new" class="d-none">
|
||||
<input type="hidden" name="_prefill" value="{{ client.id }}">
|
||||
</form>
|
||||
<form method="post" action="/rolodex/{{ client.id }}/delete" onsubmit="return confirm('Delete this client? This cannot be undone.');">
|
||||
<button type="submit" class="btn btn-outline-danger">
|
||||
<i class="bi bi-trash me-1"></i>Delete
|
||||
|
||||
Reference in New Issue
Block a user