Skip to content

Commit

Permalink
Merge branch 'main' into split_news_behaviors
Browse files Browse the repository at this point in the history
  • Loading branch information
luca-bellenghi authored Sep 3, 2024
2 parents 9c75541 + b347008 commit b5d253f
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ Changelog
[mamico]
- Add folder creation (multimedia + allegati) for "ComunicatiStampa" CT (if exists)
[mamico]

- Add "Emolumenti a carico della finanza pubblica" to Persona
Add "Dichiarazioni di insussistenza e incompatibilità" to Persona
[lucabel]

6.2.14 (2024-07-11)
-------------------
Expand Down
24 changes: 23 additions & 1 deletion src/design/plone/contenttypes/interfaces/persona.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,24 @@ class IPersona(model.Schema, IDesignPloneContentType):
),
)

emolumenti_a_carico_della_finanza_pubblica = field.NamedBlobFile(
title=_(
"emolumenti_a_carico_della_finanza_pubblica_label",
default="Emolumenti a carico della finanza pubblica",
),
required=False,
description="",
)

dichiarazioni_di_insussistenza_e_incompatibilita = field.NamedBlobFile(
title=_(
"dichiarazioni_di_insussistenza_e_incompatibilita_label",
default="Dichiarazioni di insussistenza e incompatibilità",
),
required=False,
description="",
)

# custom widgets
form.widget(
"organizzazione_riferimento",
Expand Down Expand Up @@ -144,7 +162,11 @@ class IPersona(model.Schema, IDesignPloneContentType):
model.fieldset(
"documenti",
label=_("documenti_label", default="Documenti"),
fields=["curriculum_vitae"],
fields=[
"curriculum_vitae",
"emolumenti_a_carico_della_finanza_pubblica",
"dichiarazioni_di_insussistenza_e_incompatibilita",
],
)

# SearchableText fields
Expand Down
9 changes: 8 additions & 1 deletion src/design/plone/contenttypes/tests/test_ct_persona.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,14 @@ def test_persona_fields_documenti_fieldset(self):
Get the list from restapi
"""
resp = self.api_session.get("@types/Persona").json()
self.assertEqual(resp["fieldsets"][3]["fields"], ["curriculum_vitae"])
self.assertEqual(
resp["fieldsets"][3]["fields"],
[
"curriculum_vitae",
"emolumenti_a_carico_della_finanza_pubblica",
"dichiarazioni_di_insussistenza_e_incompatibilita",
],
)

def test_persona_fields_informazioni_fieldset(self):
"""
Expand Down

0 comments on commit b5d253f

Please sign in to comment.