Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the plugin text_enabled for django CMS #2

Merged
merged 2 commits into from Mar 18, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -13,7 +13,7 @@ class FormDesignerPlugin(CMSPluginBase):
module = _('Form Designer') module = _('Form Designer')
name = _('Form') name = _('Form')
admin_preview = False admin_preview = False

text_enabled=True
def render(self, context, instance, placeholder): def render(self, context, instance, placeholder):
if instance.form_definition.form_template_name: if instance.form_definition.form_template_name:
self.render_template = instance.form_definition.form_template_name self.render_template = instance.form_definition.form_template_name
Expand All @@ -23,5 +23,7 @@ def render(self, context, instance, placeholder):
# Redirection does not work with CMS plugin, hence disable: # Redirection does not work with CMS plugin, hence disable:
return process_form(context['request'], instance.form_definition, context, disable_redirection=True) return process_form(context['request'], instance.form_definition, context, disable_redirection=True)


def icon_src(self, instance):
return "/static/plugin_icons/form.png"


plugin_pool.register_plugin(FormDesignerPlugin) plugin_pool.register_plugin(FormDesignerPlugin)
Binary file added form_designer/static/plugin_icons/form.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.