Skip to content

Commit

Permalink
style: dict literal for cca:program custom field
Browse files Browse the repository at this point in the history
  • Loading branch information
phette23 committed Oct 18, 2024
1 parent 9e6eb8e commit ea7cdd9
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions site/cca/customfields.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,21 @@ def mapping(self):
# props hard-coded into CommunityField.js
"props": {},
},
# TODO: literal dict & _() for i18n strings
dict(
field="cca:program",
ui_widget="AutocompleteDropdown",
template="program.html",
props=dict(
autocompleteFrom="/api/vocabularies/programs",
autocompleteFromAcceptHeader="application/vnd.inveniordm.v1+json",
clearable=True,
description=_("Select one of CCA's academic programs"),
icon="building",
label=_("Academic Program"),
multiple=False, # True for selecting multiple values
placeholder=_("Animation Program"),
),
),
{
"field": "cca:program",
"ui_widget": "AutocompleteDropdown",
"template": "program.html",
"props": {
"autocompleteFrom": "/api/vocabularies/programs",
"autocompleteFromAcceptHeader": "application/vnd.inveniordm.v1+json",
"clearable": True,
"description": _("Select one of CCA's academic programs"),
"icon": "building",
"label": _("Academic Program"),
"multiple": False, # True for selecting multiple values
"placeholder": _("Animation Program"),
},
},
{
"field": "cca:archives_series",
"template": "archivesseries.html",
Expand Down

0 comments on commit ea7cdd9

Please sign in to comment.