Skip to content

Commit

Permalink
fix persona schema
Browse files Browse the repository at this point in the history
  • Loading branch information
cekk committed Aug 1, 2024
1 parent 8d1a515 commit c979da2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 43 deletions.
41 changes: 0 additions & 41 deletions src/iosanita/contenttypes/interfaces/persona.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,6 @@ class IPersona(model.Schema, IIosanitaContenttypes):
required=True,
)

uo_correlata = RelationList(
title=_(
"uo_correlata_servizio_label", default="Unità organizzativa responsabile"
),
default=[],
value_type=RelationChoice(vocabulary="plone.app.vocabularies.Catalog"),
required=False,
missing_value=(),
)

orari_ricevimento = BlocksField(
title=_("orari_ricevimento_label", default="Orari di ricevimento"),
description=_(
Expand All @@ -119,36 +109,13 @@ class IPersona(model.Schema, IIosanitaContenttypes):
missing_value=(),
)

struttura_correlata = RelationList(
title=_(
"struttura_correlata_label",
default="Strutture in cui opera",
),
description=_(
"struttura_correlata_help",
default="Necessario per le persone interne all'ASL, opzionale per medici di base e pediatri.",
),
default=[],
value_type=RelationChoice(vocabulary="plone.app.vocabularies.Catalog"),
required=False,
missing_value=(),
)

biografia = BlocksField(
title=_("biografia_label", default="Biografia"),
description=_("biografia_help", default=""),
required=False,
)

# custom widgets
form.widget(
"uo_correlata",
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"selectableTypes": ["UnitaOrganizzativa"],
},
)
form.widget(
"struttura_ricevimento",
RelatedItemsFieldWidget,
Expand All @@ -158,14 +125,6 @@ class IPersona(model.Schema, IIosanitaContenttypes):
"selectableTypes": ["Struttura"],
},
)
form.widget(
"struttura_correlata",
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"selectableTypes": ["Struttura"],
},
)

# custom fieldsets
model.fieldset(
Expand Down
2 changes: 0 additions & 2 deletions src/iosanita/contenttypes/tests/test_ct_persona.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ def test_persona_fields_default_fieldset(self):
"titolo_persona",
"description",
"image",
"uo_correlata",
"struttura_correlata",
],
)

Expand Down

0 comments on commit c979da2

Please sign in to comment.