collective / collective.z3cform.datagridfield

Datagrid Field for z3c.forms
https://pypi.org/project/collective.z3cform.datagridfield/
8 stars 28 forks source link

Shouldn't the datagridfield_input template respect view/klass or at least view/display_table_css_class ? #119

Closed mtrebron closed 1 year ago

mtrebron commented 2 years ago

While working on a standalone Plone form, MyForm(AutoExtensibleForm, form.Form) where one of the fields is a DataGrid, I thought it useful to add the css listing class to my widget to take advantage of even and odd colored rows in the Barceloneta theme.

Adding a klass attribute to either the widget directives or in my custom WidgetFactory did not work, nor did the widget.addClass() method.

I investigated further and found that the datagrid_input template completely ignores the setting, and the datagrid_display template only considers view/display_table_css_class

What is the purpose of setting klass to "datagridfield" here? Is there a particular reason for ignoring these settings in the templates?

mtrebron commented 2 years ago

I just noticed: https://github.com/collective/collective.z3cform.datagridfield/issues/15 @gbastien since you were involved in the original implementation, do you have an opinion?

petschki commented 1 year ago

this got implemented here https://github.com/collective/collective.z3cform.datagridfield/pull/131