Support auto-hashing fields via hooks.

This commit is contained in:
mikestefanello 2025-04-12 16:19:18 -04:00
parent 56f8a619a5
commit 7ff1e3f9d2
6 changed files with 49 additions and 36 deletions

View file

@ -71,9 +71,13 @@ func AdminEntityForm(ctx echo.Context, schema *load.Schema, values url.Values) e
// TODO password?
switch f.Info.Type {
case field.TypeString:
inputType := "text"
if f.Sensitive {
inputType = "password"
}
nodes = append(nodes, InputField(InputFieldParams{
Name: f.Name,
InputType: "text",
InputType: inputType,
Label: label(f.Name),
Value: getValue(f.Name),
}))