From 2a5a5229e1249c0d8aee99ca3d29fd6204b3f6ab Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sun, 25 Oct 2015 17:02:42 +0100 Subject: [PATCH] Fix wizard issues --- djangocms_blog/cms_wizards.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/djangocms_blog/cms_wizards.py b/djangocms_blog/cms_wizards.py index 3909075..e66725f 100644 --- a/djangocms_blog/cms_wizards.py +++ b/djangocms_blog/cms_wizards.py @@ -4,6 +4,7 @@ from __future__ import absolute_import, print_function, unicode_literals try: from cms.wizards.wizard_base import Wizard from cms.wizards.wizard_pool import wizard_pool + from django import forms from django.utils.text import slugify from django.utils.translation import ugettext_lazy as _ from parler.forms import TranslatableModelForm @@ -20,12 +21,19 @@ try: if kwargs.get('data', False): kwargs['data']['1-app_config'] = self.default_appconfig super(PostWizardForm, self).__init__(*args, **kwargs) + self.fields['app_config'].widget = forms.Select( + attrs=self.fields['app_config'].widget.attrs, + choices=self.fields['app_config'].widget.choices, + ) self.fields['app_config'].widget.attrs['disabled'] = True class Meta: model = Post fields = ['app_config', 'title', 'abstract', 'categories'] + class Media: + js = ('admin/js/jquery.js', 'admin/js/jquery.init.js',) + class PostWizard(Wizard): pass