Skip to main content

Formlib-based controlpanels for Plone.

Project description


This package provides various control panels for Plone and some infrastrucuture
to make it as easy as possible to create those with the help of zope.formlib.

The general approach taken is to re-use as much of formlib as possible. This
lead to the decision to use formlib's EditForm's functionality, as these
provide the most automation found in formlib today.

As a result of this decision we needed to take a slightly unconventional
approach as EditForm's only work on one single context, as they are targeted
at editing content objects, which usually are available as one context only.

Control panels on the other side most commonly present settings from various
sources and group these in a user-friendly way. In order to still be able to use
EditForm's we introduce one abstract adapter as a middleware layer per control
panel, that is used as the one context formlib's EditForm's need but internally
pulls in the various settings from all the possible sources and pushes them back
to the right places again.

Following this approach a control panel consists of at least three classes:

- An interface that describes the settings to be available in the control
panel with the help of zope.schema. This gives us automatic type checking
and some other basic validation of the settings. It also lets us specify
vocabularies to be used for Choice-type properties.

- An adapter implementing the above interface, exposing all the different
settings as properties. As we don't want to have those control panels
available all over the place, we restrict them to adapt the 'IPloneSiteRoot'
only. Sometimes we use the 'SchemaAdapterBase' class from CMFDefault.formlib
and the property wrapper 'ProxyFieldProperty' to automatically convert the
values found in our site to the types expected by formlib and vica versa.
For example we often need to store tuples while formlib expects sets, store
encoded strings in site encoding rather than unicode or use Zope2's DateTime
class instead of Python's datetime package.

- And finally the form itself. We can use the common base class
'ControlPanelForm' to provide us with a consistent look and feel for all
control panels. This is accomplished by using the ''
template. For most cases this should be the only template that needs to be

The 'ControlPanelForm' also provides us with two common actions and as a
side effect overrides the 'handle_edit_action' in a Zope2-compatible way,
where the default implementation needs the current locale to be present as
part of the REQUEST, which is not the case in a Zope2 environment so far.

The form is also the place to specify custom widgets for some properties.
There are some custom widgets available in the module in this

While the above-mentioned works pretty well for simple cases it is not yet clear
if it will work for complex control panels in the same way. Especially forms
that use a multitude of actions (for example user/group management) or consist
of more than one 'tab' (for example kupu but also smart folder settings) are not
easily implemented so far.

Hopefully we will be able to provide common helper classes and templates for
those complex cases as well, though.


1.1.3 - 2009-03-07

- "Mark external links" and "External links open in new window" were not
working independently ('mark' had to be set for 'new window' to work) and
marking could not be turned off at all (#7383). Fixed by having either one
enable the js support and adding a new site property to control marking.
Implemented so that new site property will be assumed false if missing and
created on change if missing -- so no migration required. There is a matching
change in Plone app in a couple of javascripts.

- 'Enable User Folders' in the security control panel supports create/delete a
'My Folder' link user action know from Plone 2.*

- Added failing browser test to catch the missing 'My Folder' link
when member creation is enabled

1.1.2 - 2008-08-18

- Use the MultiCheckBoxWidget from that uses <label>s
to be accessible. This closes

- Refactor handling of versioning policies in the types control panel:
allow the admin to choose from three common versioning policies (no
versioning, manual versioning and automatic versioning) which map to
CMFEditions settings.

- Added checkbox for enabling/disabling inline editing.

- Simplified the mail control panel to present all information on one tab.
In case of validation errors the panel behaved in most unintuitive ways.
This closes, and

1.1.1 - June 2, 2008

- Declare dependencies for plone.* packages.

- Reformat documentation in reST and include it in the package description.

- Fix nested forms in RAMCache control panel.

1.1 - April 19. 2008

- Fixed saving of esmtp username and password in SecureMailHost

- Added new IPloneControlPanelView marker interface and let all views and
forms implement it.

- Added new yet unused controlpanel overview page.

- Fix invalid leading space in all 'Up to Site Setup' links.

- Added authenticator token and verification calls for CSRF protection.

1.0.5 - March 26, 2008

- `Enable self registration flag` in security control panel was broken
in some cases with custom roles. Patch provided by davidray, thx!
This closes

- Added an IConfigurationChangedEvent which is fired on each successful
change of any configuration setting and a subscriber which empties all
RAM caches when some configuration changed. This closes

1.0.4 - February 13, 2008

- Take advantage of NORMALIZE_WHITESPACE to be independent of the tidy_html

- Fixed vocabulary in skins control panel to support proper i18n.
This closes

- Changed import of FormFieldsets to avoid a deprecation warning.

- Fixed filter control panel tests.

1.0.3 - November 30, 2007

- Fixed description in filter control panel to be recognizable by i18ndude.

- Protected the maintenance control panel with the View management screens
permission at the Zope root folder. This closes

1.0.2 - October 7, 2007

- Fixed language control panel to only show one language option and fix
its description. This closes and

1.0.1 - September 10, 2007

- Updated help text to match implementation.

- Fixed test in site.txt to work in Zope 2.11.

- If we are looking at settings for the default workflow lookup the real
workflow. This fixes #6843 (yes, that bug again).

- Another small string update while we're at it.

1.0 - August 14, 2007

- If we are looking at settings for the default workflow lookup the
real workflow. This fixes
(yes, that bug again).

- Fixed the translation of type names on the search and markup control
panels. This refs

- The UI allowed to disable country-specific language variants even if
one was still active as the default language. You get a nice error
message now. This closes

- Use checkboxes instead of a evil MultiSelect for the wiki settings.
This closes for real.

- Internationalized the workflow part of the types control panel. All
descriptions, states and titles should be translated now.

- Fixed order of types in the dropdown. We sort by translated title now.

- When updating the default workflow do not reset the workflow for types
using the default workflow to the new default workflow. This fixes
the last part of

- Handle changing the workflow from a type to the default workflow if the
default workflow is the same as the previous workflow correctly. This
fixes part of

- When we remap the default workflow change the default workflow in
the workflow tool as well. This fixes part of

- Remapping the "(Default)" workflow to No Workflow didn't work.

- Remapping to "No Workflow" resulted in an error, fixed. Thanks to
rsantos for the patch. Fixes

- Made column checkbox widget easily subclassable for being able to use it
with different amount of columns from other packages.

1.0rc3 - July 28, 2007

- Fixed missing history entries.

1.0rc2 - July 27, 2007

- Add a description to the no-workflow fallback. This fixes

- Filter control panel doesn't warn you when you haven't saved your changes
Added enableUnloadFormProtection class to the control panel form.
This references

- Removed lots of irrelevant options from the language control panel. The
selection of the default language could use a simpler widget, but it's
too late to change that now. All advanced options should be made
available through control panels in add-ons which actually use these
settings. This closes

- Fixed various bugs in the LanguageTableWidget. Removed broken code that
tried to show the country flags. Showing 150 flags is rather excessive.
This closes

- Removed multilingual content settings from the language control panel.
These don't have any effect in a standard Plone site. LinguaPlone / features its own control panel.

1.0rc1 - July 9, 2007

- Do not show really user unfriendly types anymore in the search and types
control panels. This closes

- Consistently bicapitalized 'JavaScript'. This refs

- Fixed another spelling error on the filter control panel. This closes

- Fixed two spelling errors on the filter control panel. This closes

- Added and used the new LanguageTableWidget for the available language

- Use the new LanguageDropdownChoiceWidget for the default language field.

- Added first working version of the new language control panel. It still
needs two new locale aware widgets for the language listings. This refs

- Added support for optional descriptions on fieldsets.

- Added RAMCache control panel. You can invoke it via

- Localized the calendar control panel weekday names based on the Zope 3
locales information, which is available from the portal_state view.

- Removed title customization from the types control panel. This is
currently not possible in any i18n-safe way. This closes

1.0b5 - May 5, 2007

- Fixed dummy on_save method to accept the data argument.

1.0b4 - May 5, 2007

- Pass data to the on-save template method.

- Add a callback method from the save button handler. This makes it easier
to react when saving is finished (successfully) - otherwise, the schema
adapter properties are simple set one-by-one and you can't do anything
when form saving is complete. The alternative is to override the button
handler, but then we lose some of the consistency that
tries to introduce.

- Wording.

1.0b3 - May 1, 2007

- Adjusted the mail control panel to store the email settings on the portal
root intead of in the site properties. This closes

1.0b2 - March 23, 2007

- Spelling corrections and wording.

- Replace getToolByNames by getUtility.

1.0b1 - March 5, 2007

- Lots more control panels.
[hannosch, optilude, limi, siebo, aclark, jladage, andrewb]

1.0a2 - February 6, 2007

- Additional control panels.
[tomster, whit]

- Groundwork and first control panels.

Project details

Release history Release notifications

This version
History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date (78.2 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page