From 8afc9544aed7d2d1fcbfd73411192f6afe7b98dc Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Thu, 26 Oct 2023 13:55:51 +0100 Subject: [PATCH] reactivate autocomplete on institution name field --- portality/forms/application_forms.py | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/portality/forms/application_forms.py b/portality/forms/application_forms.py index 33cd4c1eb7..e66a8e2ef2 100644 --- a/portality/forms/application_forms.py +++ b/portality/forms/application_forms.py @@ -558,28 +558,37 @@ class FieldDefinitions: "a society or other type of institution, enter that here."], "placeholder": "Type or select the society or institution’s name" }, - "contexts" : { + "widgets": [ + "trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~ + {"autocomplete": {"type" : "journal", "field": "bibjson.institution.name.exact"}}, # ~~^-> Autocomplete:FormWidget~~ + "full_contents" # ~~^->FullContents:FormWidget~~ + ], + "contexts": { "admin": { "widgets": [ + "trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~ + {"autocomplete": {"type": "journal", "field": "bibjson.institution.name.exact"}}, + # ~~^-> Autocomplete:FormWidget~~ "click_to_copy", # ~~^-> ClickToCopy:FormWidget~~ ] }, "associate_editor": { "widgets": [ + "trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~ + {"autocomplete": {"type": "journal", "field": "bibjson.institution.name.exact"}}, + # ~~^-> Autocomplete:FormWidget~~ "click_to_copy", # ~~^-> ClickToCopy:FormWidget~~ ] }, "editor": { "widgets": [ + "trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~ + {"autocomplete": {"type": "journal", "field": "bibjson.institution.name.exact"}}, + # ~~^-> Autocomplete:FormWidget~~ "click_to_copy", # ~~^-> ClickToCopy:FormWidget~~ ] } - }, - "widgets": [ - "trim_whitespace", # ~~^-> TrimWhitespace:FormWidget~~ - {"autocomplete": {"type" : "journal", "field": "bibjson.institution.name.exact"}}, # ~~^-> Autocomplete:FormWidget~~ - "full_contents" # ~~^->FullContents:FormWidget~~ - ] + } } # ~~->$ InstitutionCountry:FormField~~