Added 'textarea' class to 'text' field widgets
authorThierry Florac <thierry.florac@onf.fr>
Tue, 19 Sep 2017 13:43:54 +0200
changeset 174 3e6b4514cacb
parent 173 fd3b8d4c3168
child 175 fb51fb6d6129
Added 'textarea' class to 'text' field widgets
src/pyams_content/shared/form/zmi/summary.py
--- a/src/pyams_content/shared/form/zmi/summary.py	Tue Sep 19 11:38:25 2017 +0200
+++ b/src/pyams_content/shared/form/zmi/summary.py	Tue Sep 19 13:43:54 2017 +0200
@@ -75,6 +75,8 @@
             field = IFormFieldContainer(self.context).get(widget.field.__name__)
             if field is not None:
                 widget.placeholder = field.placeholder
+                if field.field_type == 'text':
+                    widget.widget_css_class = 'textarea'
 
 
 @adapter_config(context=(IFormFieldContainerTarget, IPyAMSLayer, FormFieldContainerSummaryView), provides=IFormHelp)