Commits

tehfink committed 9a829bf

set 'text_enabled' and updated get_form in accordance with changes in commit dddd6f244ba7d94dd045823c50dc43a79bd94bf0

Comments (0)

Files changed (1)

cmsplugin_faq/cms_plugins.py

         return FaqEntryPluginForm
 
     def get_form(self, request, obj=None, **kwargs):
-        plugins = plugin_pool.get_text_enabled_plugins(self.placeholder)
+        page = None
+        if obj:
+            page = obj.page
+        plugins = plugin_pool.get_text_enabled_plugins(self.placeholder, page)
         form = self.get_form_class(request, plugins)
         kwargs['form'] = form # override standard form
         return super(CMSFaqEntryPlugin, self).get_form(request, obj, **kwargs)
 
     model = FaqEntryLink
     name = _("FAQ Entry Link")
+    text_enabled = True
     render_template = "plugins/cmsplugin_faq/faq_entry_link.html"
     
     def render(self, context, instance, placeholder):
         #if page_id was not set randomly
         if not page_id:
             page_id = instance.faqentrylink.link.page_id
+        import pdb; pdb.set_trace()
         url = '/' + instance.link.language + Page.objects.get(id=page_id).get_absolute_url()
         
         context.update({