23 lines
544 B
Plaintext
23 lines
544 B
Plaintext
package user
|
|
|
|
import (
|
|
"gobeyhan/views/admin"
|
|
"gobeyhan/database/models"
|
|
"fmt"
|
|
)
|
|
|
|
templ Edit(user models.User, roles []models.Role, errors map[string]string) {
|
|
@admin.Layout("Edit User") {
|
|
<div class="max-w-2xl mx-auto py-6">
|
|
<h1 class="text-2xl font-semibold text-gray-900 mb-6">Edit User</h1>
|
|
@Form(FormProps{
|
|
User: user,
|
|
Roles: roles,
|
|
Action: fmt.Sprintf("/admin/users/%d", user.ID),
|
|
IsEdit: true,
|
|
Errors: errors,
|
|
})
|
|
</div>
|
|
}
|
|
}
|