From 73daf2e633102594401295c353437f0de1a0e4d2 Mon Sep 17 00:00:00 2001 From: Adolfo Fitoria Date: Wed, 29 Aug 2012 14:19:35 -0600 Subject: made tinymce work on the widgets --- askbot/forms.py | 3 +-- askbot/setup_templates/settings.py | 1 - askbot/setup_templates/tinymce_sample_config.py | 1 - askbot/views/widgets.py | 2 +- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/askbot/forms.py b/askbot/forms.py index 0011210d..2711d9fa 100644 --- a/askbot/forms.py +++ b/askbot/forms.py @@ -900,7 +900,6 @@ class AskWidgetForm(forms.Form, FormWithHideableFields): '''Simple form with just the title to ask a question''' title = TitleField() - text = EditorField() ask_anonymously = forms.BooleanField( label=_('ask anonymously'), help_text=_( @@ -915,7 +914,7 @@ class AskWidgetForm(forms.Form, FormWithHideableFields): #hide ask_anonymously field if not askbot_settings.ALLOW_ASK_ANONYMOUSLY: self.hide_field('ask_anonymously') - + self.fields['text'] = EditorField() if not include_text: self.hide_field('text') self.fields['text'].required=False diff --git a/askbot/setup_templates/settings.py b/askbot/setup_templates/settings.py index 71f49505..d0cb6e2d 100644 --- a/askbot/setup_templates/settings.py +++ b/askbot/setup_templates/settings.py @@ -255,6 +255,5 @@ TINYMCE_DEFAULT_CONFIG = { 'theme_advanced_resizing': True, 'theme_advanced_resize_horizontal': False, 'theme_advanced_statusbar_location': 'bottom', - 'width': '723', 'height': '250' } diff --git a/askbot/setup_templates/tinymce_sample_config.py b/askbot/setup_templates/tinymce_sample_config.py index c75170b0..d3ac1d12 100644 --- a/askbot/setup_templates/tinymce_sample_config.py +++ b/askbot/setup_templates/tinymce_sample_config.py @@ -21,6 +21,5 @@ TINYMCE_DEFAULT_CONFIG = { 'theme_advanced_resizing': True, 'theme_advanced_resize_horizontal': False, 'theme_advanced_statusbar_location': 'bottom', - 'width': '723', 'height': '250' } diff --git a/askbot/views/widgets.py b/askbot/views/widgets.py index 4e368cba..d0707a73 100644 --- a/askbot/views/widgets.py +++ b/askbot/views/widgets.py @@ -117,7 +117,7 @@ def ask_widget(request, widget_id): return redirect(next_url) form = forms.AskWidgetForm(include_text=widget.include_text_field) - + data = { 'form': form, 'widget': widget, -- cgit v1.2.3-1-g7c22