{{define "users_update_content"}}
{{if .FlashError}}
{{.FlashError}}
{{end}} {{if .FlashSuccess}}
{{.FlashSuccess}}
{{end}}
{{if .CSRFField}}{{.CSRFField}}{{end}} {{if .CSRFCookie}}{{end}}
Provide either userId or username for each row. Use new_username to change an account's username. All other columns match the create template; only non-empty values are applied. Roles column should list human-readable role names (comma, semicolon, or pipe separated).
{{if .RolesError}}
{{.RolesError}}
{{end}} {{if .Roles}}

Use the role names from this list in the CSV roles column.

{{range .Roles}} {{end}}
ID Name Description Global
{{.ID}} {{.Name}} {{.Description}} {{if .Global}}Yes{{else}}No{{end}}
{{end}} {{if .UpdateSummary}}

Processed file: {{.UpdateSummary.ProcessedFilename}} at {{.UpdateSummary.ProcessedAt.Format "2006-01-02 15:04 MST"}}.

{{end}} {{if .UpdateResults}}
{{range .UpdateResults}} {{end}}
Row User Lookup Updated Fields Result Role Assignments Processing Time
{{.Row}} {{if .UserID}} #{{.UserID}} {{end}} {{if .Username}} ({{.Username}}) {{end}} {{.LookupMethod}} {{if .UpdatedFields}}
    {{range .UpdatedFields}}
  • {{.}}
  • {{end}}
{{else}} — {{end}}
{{if .Error}}
{{.Error}}
{{else if .Updated}} Updated {{else}} Skipped {{end}}
{{if .RoleAssignments}}
    {{range .RoleAssignments}}
  • {{if .Success}}✅{{else}}⚠️{{end}} {{if .Role}}{{.Role}} ({{.RoleID}}){{else}}{{.Token}}{{end}} — {{.Message}}
  • {{end}}
{{else if .Error}} — {{else}} No roles provided {{end}}
{{.ProcessingTime}}
{{end}}
{{end}}