feat: organisation logo (attachOne logo) and payload helpers
- Organisation gains the public attachOne logo (OrganisationLogoField), editable as an image upload on the Organisations form; avatar unchanged - OrganisationLogoURL and OrganisationLogoFields give applications the has_logo, logo and logo_url keys for their organisation payloads - no migration: attachments live in system_files
This commit is contained in:
@@ -156,13 +156,17 @@ func TestAdminOrganisations(t *testing.T) {
|
||||
if field.Mode != "image" || field.ImageWidth != 120 || field.ImageHeight != 120 {
|
||||
t.Fatalf("avatar field = %+v", field)
|
||||
}
|
||||
case "logo":
|
||||
if field.Mode != "image" || field.ImageWidth != 240 || field.ImageHeight != 120 {
|
||||
t.Fatalf("logo field = %+v", field)
|
||||
}
|
||||
case "members":
|
||||
if field.Context != "update" || field.Tab != "Members" {
|
||||
t.Fatalf("members field = %+v", field)
|
||||
}
|
||||
}
|
||||
}
|
||||
if want := []string{"name:text", "slug:text", "description:textarea", "avatar:fileupload", "members:relation-manager"}; !reflect.DeepEqual(names, want) {
|
||||
if want := []string{"name:text", "slug:text", "description:textarea", "avatar:fileupload", "logo:fileupload", "members:relation-manager"}; !reflect.DeepEqual(names, want) {
|
||||
t.Fatalf("form fields = %v, want %v", names, want)
|
||||
}
|
||||
if len(form.Preview) != 0 && string(form.Preview) != "null" {
|
||||
|
||||
Reference in New Issue
Block a user