diff options
| author | haturatu <taro@eyes4you.org> | 2026-04-22 04:46:24 +0900 |
|---|---|---|
| committer | haturatu <taro@eyes4you.org> | 2026-04-22 04:46:24 +0900 |
| commit | 4b0271272e983fdb85d4b816cbd91f34d91a7884 (patch) | |
| tree | ad92ba661f0f9e8b16d93f333ebf43ffd331a892 /templates | |
| parent | d18b4f9d615d8942ff604a53be92da2c8e853635 (diff) | |
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/admin.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/admin.html b/templates/admin.html index 6c08132..0ce6452 100644 --- a/templates/admin.html +++ b/templates/admin.html @@ -38,11 +38,11 @@ </td> <td>{{if .IsActive}}Yes{{else}}No{{end}}</td> <td>{{.FailedLogins}}</td> - <td>{{if .LastLoginAt.Valid}}{{.LastLoginAt.Time.Format "2006-01-02 15:04"}}{{else}}Never{{end}}</td> + <td>{{if .LastLoginAt}}{{.LastLoginAt.Format "2006-01-02 15:04"}}{{else}}Never{{end}}</td> <td> - <button onclick="updateRole({{.ID}})">Save Role</button> - <button onclick="toggleActive({{.ID}}, {{not .IsActive}})">{{if .IsActive}}Deactivate{{else}}Activate{{end}}</button> - <button class="delete" onclick="deleteUser({{.ID}})">Delete</button> + <button onclick="updateRole({{printf "%q" .ID}})">Save Role</button> + <button onclick="toggleActive({{printf "%q" .ID}}, {{not .IsActive}})">{{if .IsActive}}Deactivate{{else}}Activate{{end}}</button> + <button class="delete" onclick="deleteUser({{printf "%q" .ID}})">Delete</button> </td> </tr> {{end}} |
