Commit f8bad792 authored by Sven Franck's avatar Sven Franck

erp5_corporate_identity_test: set editor preference to text area

parent 2192b530
"""
================================================================================
Tear down preferences set for template test
Set preference for template test to textarea
================================================================================
"""
# parameters (* default)
# ------------------------------------------------------------------------------
# inspired by erp5_user_tutorial_ui_test
portal = context.getPortalObject()
zuite_preference_id = "zuite_erp5_ui_test_preference"
isTransitionPossible = portal.portal_workflow.isTransitionPossible
context.Zuite_setPreference('')
pref = context.portal_preferences.erp5_ui_test_preference
preference = getattr(portal.portal_preferences, zuite_preference_id, None)
if preference is None:
preference = context.portal_preferences.newContent(
portal_type="Preference",
id=zuite_preference_id
)
if isTransitionPossible(preference, "enable"):
preference.enable()
pref.setPreferredTextEditor('text_area')
preference.setPreferredTextEditor("text_area")
preference.setPreferredSourceCodeEditor("text_area")
portal.portal_caches.clearAllCache()
#portal = context.getPortalObject()
#zuite_preference_id = "zuite_erp5_ui_test_preference"
#isTransitionPossible = portal.portal_workflow.isTransitionPossible
#
#preference = getattr(portal.portal_preferences, zuite_preference_id, None)
#if preference is None:
# preference = context.portal_preferences.newContent(
# portal_type="Preference",
# id=zuite_preference_id
# )
# if isTransitionPossible(preference, "enable"):
# preference.enable()
#
#preference.setPreferredTextEditor("text_area")
#preference.setPreferredSourceCodeEditor("text_area")
#portal.portal_caches.clearAllCache()
return "Ok"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment