Edit posts
Use fix routes for user profile edit handles to make it easier when user decides to change his username
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
<div class="bg-white rounded-lg shadow-md border border-gray-200 p-8">
|
||||
<h2 class="text-xl font-semibold text-gray-900 mb-6">Profile Information</h2>
|
||||
|
||||
<form hx-put="/users/{{ user.username }}/edit"
|
||||
<form hx-put="/users/edit"
|
||||
hx-target="#edit-messages"
|
||||
hx-swap="innerHTML"
|
||||
class="space-y-6">
|
||||
<input type="hidden" name="user_id" value="{{ user.user_id }}" />
|
||||
|
||||
<div>
|
||||
<label for="username" class="block text-sm font-medium text-gray-700 mb-1">
|
||||
@@ -45,7 +46,7 @@
|
||||
|
||||
<button type="submit"
|
||||
class="w-full bg-blue-600 text-white hover:bg-blue-700 font-medium py-2 px-4 rounded-md transition-colors">
|
||||
Save Changes
|
||||
Save changes
|
||||
</button>
|
||||
|
||||
<div id="edit-messages"></div>
|
||||
|
||||
Reference in New Issue
Block a user