Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed maximumSelectionSize from all fields that had it greater than 0 #229

Merged
merged 1 commit into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ Changelog
6.1.8 (unreleased)
------------------

- Add behavior aromento to Link CT
- Add behavior argomento to Link CT
[lucabel]
- Removed maximumSelectionSize from all fields that had it greater than 0
[pnicolli]


6.1.7 (2023-12-20)
Expand Down
2 changes: 0 additions & 2 deletions src/design/plone/contenttypes/behaviors/argomenti.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ class IArgomentiSchema(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 20,
"selectableTypes": ["Pagina Argomento"],
},
)
Expand Down Expand Up @@ -93,7 +92,6 @@ class IArgomentiLink(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 20,
"selectableTypes": ["Pagina Argomento"],
},
)
Expand Down
5 changes: 0 additions & 5 deletions src/design/plone/contenttypes/behaviors/contatti.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class IContattiUnitaOrganizzativa(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["PuntoDiContatto"],
},
)
Expand Down Expand Up @@ -86,7 +85,6 @@ class IContattiPersona(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["PuntoDiContatto"],
},
)
Expand Down Expand Up @@ -120,7 +118,6 @@ class IContattiServizio(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["PuntoDiContatto"],
},
)
Expand Down Expand Up @@ -154,7 +151,6 @@ class IContattiVenue(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["PuntoDiContatto"],
},
)
Expand Down Expand Up @@ -188,7 +184,6 @@ class IContattiEvent(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["PuntoDiContatto"],
},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class IDatasetCorrelati(model.Schema):
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"selectableTypes": ["Dataset"],
"maximumSelectionSize": 50,
},
)

Expand Down
3 changes: 0 additions & 3 deletions src/design/plone/contenttypes/behaviors/evento.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ class IEvento(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["UnitaOrganizzativa"],
},
)
Expand All @@ -136,7 +135,6 @@ class IEvento(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["Persona", "UnitaOrganizzativa", "Servizio"],
},
)
Expand All @@ -145,7 +143,6 @@ class IEvento(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["Persona"],
},
)
Expand Down
2 changes: 0 additions & 2 deletions src/design/plone/contenttypes/behaviors/luoghi_correlati.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class ILuoghiCorrelatiSchema(model.Schema):
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"selectableTypes": ["Venue"],
"maximumSelectionSize": 50,
},
)

Expand Down Expand Up @@ -66,7 +65,6 @@ class ILuoghiCorrelatiEvento(model.Schema):
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"selectableTypes": ["Venue"],
"maximumSelectionSize": 50,
},
)

Expand Down
1 change: 0 additions & 1 deletion src/design/plone/contenttypes/behaviors/luogo.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ class ILuogo(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["UnitaOrganizzativa"],
},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,13 @@ class INewsAdditionalFields(model.Schema):
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"selectableTypes": ["Persona"],
"maximumSelectionSize": 50,
},
)
form.widget(
"notizie_correlate",
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["News Item"],
},
)
Expand All @@ -115,7 +113,6 @@ class INewsAdditionalFields(model.Schema):
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"selectableTypes": ["Venue"],
"maximumSelectionSize": 50,
},
)
model.fieldset(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class IServiziCorrelati(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["Servizio"],
},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class IStruttureCorrelate(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["UnitaOrganizzativa"],
},
)
Expand Down
2 changes: 0 additions & 2 deletions src/design/plone/contenttypes/behaviors/trasparenza.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ class ITrasparenza(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["Persona"],
},
)
Expand All @@ -283,7 +282,6 @@ class ITrasparenza(model.Schema):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["Persona"],
},
)
Expand Down
7 changes: 3 additions & 4 deletions src/design/plone/contenttypes/interfaces/documento.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class IDocumento(model.Schema, IDesignPloneContentType):
"dataset",
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={"maximumSelectionSize": 10, "selectableTypes": ["Dataset"]},
pattern_options={"selectableTypes": ["Dataset"]},
)

# servizi = RelationList(
Expand All @@ -183,7 +183,7 @@ class IDocumento(model.Schema, IDesignPloneContentType):
# "servizi",
# RelatedItemsFieldWidget,
# vocabulary="plone.app.vocabularies.Catalog",
# pattern_options={"maximumSelectionSize": 20, "selectableTypes": ["Servizio"]},
# pattern_options={"selectableTypes": ["Servizio"]},
# )

documenti_allegati = RelationList(
Expand Down Expand Up @@ -217,7 +217,6 @@ class IDocumento(model.Schema, IDesignPloneContentType):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["Persona", "UnitaOrganizzativa"],
},
)
Expand All @@ -234,7 +233,7 @@ class IDocumento(model.Schema, IDesignPloneContentType):
"documenti_allegati",
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={"maximumSelectionSize": 10, "selectableTypes": ["Documento"]},
pattern_options={"selectableTypes": ["Documento"]},
)

#  custom fieldsets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ class IPaginaArgomento(model.Schema, IDesignPloneContentType):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["UnitaOrganizzativa"],
},
)
Expand Down
2 changes: 0 additions & 2 deletions src/design/plone/contenttypes/interfaces/persona.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ class IPersona(model.Schema, IDesignPloneContentType):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["UnitaOrganizzativa"],
},
)
Expand All @@ -126,7 +125,6 @@ class IPersona(model.Schema, IDesignPloneContentType):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["Incarico"],
},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ class IPuntoDiContatto(model.Schema, IDesignPloneContentType):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["Persona"],
},
)
4 changes: 0 additions & 4 deletions src/design/plone/contenttypes/interfaces/servizio.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,6 @@ class IServizio(model.Schema, IDesignPloneContentType):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["UnitaOrganizzativa"],
},
)
Expand All @@ -417,7 +416,6 @@ class IServizio(model.Schema, IDesignPloneContentType):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["Venue", "UnitaOrganizzativa"],
},
)
Expand Down Expand Up @@ -446,7 +444,6 @@ class IServizio(model.Schema, IDesignPloneContentType):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["Documento", "CartellaModulistica"],
# "basePath": "/",
},
Expand All @@ -456,7 +453,6 @@ class IServizio(model.Schema, IDesignPloneContentType):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["Servizio"],
# "basePath": "/",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,22 +144,20 @@ class IUnitaOrganizzativa(model.Schema, IDesignPloneContentType):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["Documento"],
},
)
form.widget(
"persone_struttura",
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={"selectableTypes": ["Persona"], "maximumSelectionSize": 50},
pattern_options={"selectableTypes": ["Persona"]},
)
form.widget(
"legami_con_altre_strutture",
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["UnitaOrganizzativa"],
},
)
Expand Down Expand Up @@ -194,7 +192,6 @@ class IUnitaOrganizzativa(model.Schema, IDesignPloneContentType):
RelatedItemsFieldWidget,
vocabulary="plone.app.vocabularies.Catalog",
pattern_options={
"maximumSelectionSize": 10,
"selectableTypes": ["Venue"],
# "basePath": "/servizi",
},
Expand Down
4 changes: 0 additions & 4 deletions src/design/plone/contenttypes/tests/test_ct_servizio.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

WIDGET_PROPERTY_CHECKS = {
"tassonomia_argomenti": {
"maximumSelectionSize": 20,
"selectableTypes": ["Pagina Argomento"],
},
"ufficio_responsabile": {
Expand All @@ -30,15 +29,12 @@
"selectableTypes": ["UnitaOrganizzativa"],
},
"altri_documenti": {
"maximumSelectionSize": 10,
"selectableTypes": ["Documento", "CartellaModulistica"],
},
"servizi_collegati": {
"maximumSelectionSize": 10,
"selectableTypes": ["Servizio"],
},
"dove_rivolgersi": {
"maximumSelectionSize": 10,
"selectableTypes": ["Venue", "UnitaOrganizzativa"],
},
}
Expand Down
Loading