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) # parameters (* default)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# inspired by erp5_user_tutorial_ui_test # inspired by erp5_user_tutorial_ui_test
portal = context.getPortalObject() context.Zuite_setPreference('')
zuite_preference_id = "zuite_erp5_ui_test_preference" pref = context.portal_preferences.erp5_ui_test_preference
isTransitionPossible = portal.portal_workflow.isTransitionPossible
preference = getattr(portal.portal_preferences, zuite_preference_id, None) pref.setPreferredTextEditor('text_area')
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 = context.getPortalObject()
portal.portal_caches.clearAllCache() #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" 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