Skip to content

Commit

Permalink
Changed our content types to use TinyMCEWidget instead of RichWidget.
Browse files Browse the repository at this point in the history
The old one only showed a plain textarea.
Fixes issue smcmahon#152.
  • Loading branch information
mauritsvanrees committed Sep 8, 2015
1 parent 7a9b719 commit 03428e8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ Change History
1.8.0.beta4 (unreleased)
------------------------

- Changed our content types to use TinyMCEWidget instead of
RichWidget. The old one only showed a plain textarea. Fixes issue
#152.

- Fixed ``propertiestool.xml`` to not break importing
``types_not_searched``.

Expand Down
4 changes: 2 additions & 2 deletions Products/PloneFormGen/content/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@ def __init__(self, oid, **kwargs):
default_content_type = 'text/html',
default_output_type = 'text/x-html-safe',
allowable_content_types = zconf.ATDocument.allowed_content_types,
widget = RichWidget(
widget = TinyMCEWidget(
allow_file_upload = False,
),
)
Expand Down Expand Up @@ -1104,7 +1104,7 @@ class FGRichLabelField(BaseFormField):
default_content_type = 'text/html',
default_output_type = 'text/x-html-safe',
allowable_content_types = zconf.ATDocument.allowed_content_types,
widget=RichWidget(label=_(u'label_fglabelbody_text', default=u'Label body'),
widget=TinyMCEWidget(label=_(u'label_fglabelbody_text', default=u'Label body'),
description=_(u'help_fglabelbody_text', default=u"""
The text to display in the form.
"""),
Expand Down
2 changes: 1 addition & 1 deletion Products/PloneFormGen/content/fieldsBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def finalizeFieldSchema(schema, folderish=True, moveDiscussion=False):
default_content_type='text/html',
default_output_type='text/x-html-safe',
allowable_content_types=zconf.ATDocument.allowed_content_types,
widget=RichWidget(label=_(u'label_fgtextdefault_text', default=u'Default'),
widget=TinyMCEWidget(label=_(u'label_fgtextdefault_text', default=u'Default'),
description=_(u'help_fgtextdefault_text', default=u"""
The text the field should contain when the form is first displayed.
Note that this may be overridden dynamically.
Expand Down
6 changes: 3 additions & 3 deletions Products/PloneFormGen/content/form.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
default_content_type = zconf.ATDocument.default_content_type,
default_output_type = 'text/x-html-safe',
allowable_content_types = zconf.ATDocument.allowed_content_types,
widget = RichWidget(
widget = TinyMCEWidget(
label = _(u'label_prologue_text', default=u"Form Prologue"),
description = _(u'help_prologue_text',
default=u"This text will be displayed above the form fields."),
Expand All @@ -149,7 +149,7 @@
default_content_type = zconf.ATDocument.default_content_type,
default_output_type = 'text/x-html-safe',
allowable_content_types = zconf.ATDocument.allowed_content_types,
widget = RichWidget(
widget = TinyMCEWidget(
label = _(u'label_epilogue_text', default=u"Form Epilogue"),
description = _(u'help_epilogue_text',
default=u"The text will be displayed after the form fields."),
Expand Down Expand Up @@ -770,7 +770,7 @@ def thanksPageVocabulary(self):


###
# A few widgets (TextArea and RichWidget in particular) call the content
# A few widgets (TextArea and TinyMCEWidget in particular) call the content
# object rather than the field for this method. IMHO, this is unnecessary,
# and should be fixed in the Widget. Meanwhile, this hack ...
#
Expand Down
6 changes: 3 additions & 3 deletions Products/PloneFormGen/content/thanksPage.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
default_content_type=zconf.ATDocument.default_content_type,
default_output_type='text/x-html-safe',
allowable_content_types=zconf.ATDocument.allowed_content_types,
widget=RichWidget(
widget=TinyMCEWidget(
label=_(u"label_thanksprologue_text", default=u"Thanks Prologue"),
description=_(u"help_thanksprologue_text", default=u"This text will be displayed above the selected field inputs."),
rows=8,
Expand All @@ -95,7 +95,7 @@
default_content_type=zconf.ATDocument.default_content_type,
default_output_type='text/x-html-safe',
allowable_content_types=zconf.ATDocument.allowed_content_types,
widget=RichWidget(
widget=TinyMCEWidget(
label=_(u"label_thanksepilogue_text", default=u"Thanks Epilogue"),
description=_(u"help_thanksepilogue_text", default=u"The text will be displayed after the field inputs."),
rows=8,
Expand All @@ -114,7 +114,7 @@
<p>No input was received. Please <a title="Test Folder" href=".">visit the form</a>.</p>
""",
allowable_content_types=zconf.ATDocument.allowed_content_types,
widget=RichWidget(
widget=TinyMCEWidget(
label=_(u"label_nosubmit_text", default=u"No Submit Message"),
description=_(u"help_nosubmit_text", default=u"""
The text to display if the browser reaches this
Expand Down

0 comments on commit 03428e8

Please sign in to comment.