feat(cabana): add mltextarea field type
- mltextarea compiles (with size), binds as a writable scalar and goes through the mltext lift, translation write and hydrate paths - preset on or from an mltextarea field stays refused - tests: compile, Postgres round trip over a nullable host column with multi-line text, invalid locale maps, preset refusals
This commit is contained in:
@@ -30,8 +30,8 @@ type CRUDService struct {
|
||||
// commit; tr localizes the file limit messages. Both may be nil.
|
||||
bucket *blob.Bucket
|
||||
tr *phrasebook.Translator
|
||||
// writer persists non-default locale values for mltext/mlmarkdown fields.
|
||||
// Nil when the translate plugin is not mounted.
|
||||
// writer persists non-default locale values for mltext/mltextarea/mlmarkdown
|
||||
// fields. Nil when the translate plugin is not mounted.
|
||||
writer TranslationWriter
|
||||
}
|
||||
|
||||
@@ -1224,7 +1224,7 @@ func modelColumns(model any) map[string]struct{} {
|
||||
func scalarFormField(typ string) bool {
|
||||
switch typ {
|
||||
case "text", "textarea", "number", "checkbox", "switch", "dropdown", "datepicker",
|
||||
"markdown", "mltext", "mlmarkdown":
|
||||
"markdown", "mltext", "mltextarea", "mlmarkdown":
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user