src/pyams_gis/widget/point.py
changeset 1 bf796b698a98
parent 0 c73bb834ccbe
child 12 77e093529691
--- a/src/pyams_gis/widget/point.py	Thu May 18 17:23:48 2017 +0200
+++ b/src/pyams_gis/widget/point.py	Sun May 21 01:53:17 2017 +0200
@@ -46,10 +46,7 @@
         self.widget = widget
 
     def __call__(self, data):
-        result = GeoPoint()
-        for name, value in data.items():
-            setattr(result, name, value)
-        return result
+        return GeoPoint()
 
 
 @widgettemplate_config(mode='input', template='templates/geopoint-input.pt', layer=IFormLayer)
@@ -59,7 +56,7 @@
 
     def updateWidgets(self, setErrors=True):
         super(GeoPointWidget, self).updateWidgets(setErrors)
-        widgets = self.subform.widgets
+        widgets = self.widgets
         widgets['longitude'].input_css_class = 'col-md-2'
         widgets['latitude'].input_css_class = 'col-md-2'
         widgets['longitude'].object_data = {'ams-change-handler': 'PyAMS_GIS.position.changedCoordinate'}
@@ -99,10 +96,7 @@
         self.widget = widget
 
     def __call__(self, data):
-        result = GeoPointZ()
-        for name, value in data.items():
-            setattr(result, name, value)
-        return result
+        return GeoPointZ()
 
 
 @widgettemplate_config(mode='input', template='templates/geopoint-input.pt', layer=IFormLayer)
@@ -112,7 +106,7 @@
 
     def updateWidgets(self, setErrors=True):
         super(GeoPointZWidget, self).updateWidgets(setErrors)
-        widgets = self.subform.widgets
+        widgets = self.widgets
         widgets['longitude'].input_css_class = 'col-md-2'
         widgets['latitude'].input_css_class = 'col-md-2'
         widgets['altitude'].input_css_class = 'col-md-2'