Added label widget style
authorThierry Florac <thierry.florac@onf.fr>
Mon, 14 Jan 2019 16:26:54 +0100
changeset 1232 d61066e2bb63
parent 1231 20fbc5f350d1
child 1233 85bbcd5fa922
Added label widget style
src/pyams_content/component/paragraph/zmi/milestone.py
--- a/src/pyams_content/component/paragraph/zmi/milestone.py	Mon Jan 14 16:19:42 2019 +0100
+++ b/src/pyams_content/component/paragraph/zmi/milestone.py	Mon Jan 14 16:26:54 2019 +0100
@@ -319,6 +319,11 @@
     fields = field.Fields(IMilestone).omit('__parent__', '__name__', 'visible')
     edit_permission = MANAGE_CONTENT_PERMISSION
 
+    def updateWidgets(self, prefix=None):
+        super(MilestoneAddForm, self).updateWidgets(prefix)
+        if 'label' in self.widgets:
+            self.widgets['label'].widget_css_class = 'input height-100'
+
     def create(self, data):
         return Milestone()
 
@@ -346,6 +351,11 @@
     fields = field.Fields(IMilestone).omit('__parent__', '__name__', 'visible')
     edit_permission = MANAGE_CONTENT_PERMISSION
 
+    def updateWidgets(self, prefix=None):
+        super(MilestonePropertiesEditForm, self).updateWidgets(prefix)
+        if 'label' in self.widgets:
+            self.widgets['label'].widget_css_class = 'input height-100'
+
     def get_ajax_output(self, changes):
         output = super(self.__class__, self).get_ajax_output(changes)
         if changes: