Support auto-hashing fields via hooks.
This commit is contained in:
parent
56f8a619a5
commit
7ff1e3f9d2
6 changed files with 49 additions and 36 deletions
|
|
@ -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),
|
||||
}))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue