diff --git a/CHANGES.rst b/CHANGES.rst index 8de32401..936ef1a1 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,8 @@ Changelog 6.1.5 (unreleased) ------------------ -- Nothing changed yet. +- Allow reorder of data grid fields. + [pnicolli] 6.1.4 (2023-12-04) diff --git a/src/design/plone/contenttypes/interfaces/punto_di_contatto.py b/src/design/plone/contenttypes/interfaces/punto_di_contatto.py index 84296528..1071241f 100644 --- a/src/design/plone/contenttypes/interfaces/punto_di_contatto.py +++ b/src/design/plone/contenttypes/interfaces/punto_di_contatto.py @@ -65,7 +65,12 @@ class IPuntoDiContatto(model.Schema, IDesignPloneContentType): form.widget( "value_punto_contatto", DataGridFieldFactory, - frontendOptions={"widget": "data_grid"}, + frontendOptions={ + "widget": "data_grid", + "widgetProps": { + "allow_reorder": True, + }, + }, ) form.widget( diff --git a/src/design/plone/contenttypes/interfaces/servizio.py b/src/design/plone/contenttypes/interfaces/servizio.py index 8d18fc9a..1f53ff8a 100644 --- a/src/design/plone/contenttypes/interfaces/servizio.py +++ b/src/design/plone/contenttypes/interfaces/servizio.py @@ -464,7 +464,12 @@ class IServizio(model.Schema, IDesignPloneContentType): form.widget( "timeline_tempi_scadenze", DataGridFieldFactory, - frontendOptions={"widget": "data_grid"}, + frontendOptions={ + "widget": "data_grid", + "widgetProps": { + "allow_reorder": True, + }, + }, ) form.widget("canale_digitale_link", LinkFieldWidget)