Commits

Kai Diefenbach committed 41544ee

Bugfixes forms

Comments (0)

Files changed (2)

lfc_compositor/fields.py

         super(ReferenceInput, self).__init__(attrs)
 
     def render(self, name, value, attrs=None):
-        
+        breadcrumbs = []
         if value:
             obj = BaseContent.objects.get(pk=value)
-            breadcrumbs = []
             temp = obj
             while temp is not None:
                 breadcrumbs.insert(0, temp)

lfc_compositor/models.py

     def form(self, request, composite, **kwargs):
         """Returns the add/edit form of the widget.
         """
-        return ImageWidgetForm(**kwargs)
+        return ImageWidgetForm(request, composite, **kwargs)
 
     def render(self, request, edit=False, first_widget=False, last_widget=False):
         """Renders the widget as HTML.
     def form(self, request, composite, **kwargs):
         """Returns the add/edit form of the image widget.
         """
-        return TextWithImageWidgetForm(**kwargs)
+        return TextWithImageWidgetForm(request, composite, **kwargs)
 
     def render(self, request, edit=False, first_widget=False, last_widget=False):
         image_url = getattr(self.image, "url_%s" % self.get_size_display())