Z3c-form

Latest version: v4.2

Safety actively analyzes 638452 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 7 of 12

2.8.0

------------------

- Feature: Implemented widget layout concept similar to z3c.pagelet. The new
layout concept allows to register layout templates additional to the widget
templates. Such a layout template only get used if a widget get called.
This enhacement is optional and compatible with all previous z3c.form
versions and doesn't affect existing code and custom implementations
except if you implemented a own __call__ method for widgets which
wasn't implemented in previous versions. The new __call__ method will lookup
and return a layout template which supports additional HTML code used as
a wrapper for the HTML code returned from the widget render method.
This concept allows to define additional HTML construct provided for all
widget and render specific CSS classes arround the widget per context, view,
request, etc discriminators. Such a HTML constuct was normaly supported in
form macros which can't get customized on a per widget, view or context base.

Summary; the new layout concept allows us to define a wrapper CSS elements
for the widget element (label, widget, error) on a per widgte base and skip
the generic form macros offered from z3c.formui.

Note; you only could get into trouble if you define a widget in tal without
to prefix them with ``nocall:`` e.g. tal:define="widget view/widgets/foo"
Just add a nocall like tal:define="widget nocall:view/widgets/foo" if your
rendering engine calls the __call__method by default. Also note that the
following will also call the __call__ method tal:define="widget myWidget".

- Fixed content type extraction test which returned different values. This
probably depends on a newer version of guess_content_type. Just allow
image/x-png and image/pjpeg as valid values.

2.7.0

------------------

- Remove `zope34` extra, use an older version of z3c.form if you need to
support pre-ZTK versions.

- Require at least zope.app.container 3.7 for adding support.

- Avoid dependency on ZODB3.

- Added IField.showDefault and IWidget.showDefault
That controls whether the widget should look for field default values
to display. This can be really helpful in EditForms, where you don't
want to have default values instead of actual (missing) values.
By default it is True to provide backwards compatibility.

2.6.1

------------------

- Fixed a potential problem where a non-ascii vocabulary/source term value
could cause the checkbox and readio widget to crash.

- Fixed a problem with the ``datetime.timedelta`` converter, which failed to
convert back to the field value, when the day part was missing.

2.6.0

------------------

- Remove ":list" from radio inputs, since radio buttons can be only one value
by definition. See LP580840.

- Changed radio button and checkbox widget labels from token to value (wrapped
by a unicode conversion) to make it consistent with the parent
``SequenceWidget`` class. This way, edit and display views of the widgets
show the same label. See LP623210.

- Remove dependency on zope.site.hooks, which was moved to zope.component in
3.8.0 (present in ZTK 1.0 and above).

- Make zope.container dependency more optional (it is only used in tests)

- Properly escape JS code in script tag for the ordered-select widget. See
LP829484.

- Cleaned whitespace in page templates.

- Fix ``IGroupForm`` interface and actually use it in the ``GroupForm``
class. See LP580839.

- Added Spanish translation.

- Added Hungarian translation.

2.5.1

------------------

- Better compatibility with Chameleon 2.x.

- Added \*.mo files missing in version 2.5.0.

- Pinned minimum version of test dependency `z3c.template`.

2.5.0

------------------

- Fixed coverage report generator script buildout setup.

- Note: z3c.pt and chameleon are not fully compatible right now with TAL.
Traversing the repeat wrapper is not done the same way. ZPT uses the
following pattern:
<tal:block condition="not:repeat/value/end">, </tal:block>

Chameleon only supports python style traversing:
<tal:block condition="not:python:repeat['value'].end">, </tal:block>

- Upgrade to chameleon 2.0 template engine and use the newest z3c.pt and
z3c.ptcompat packages adjusted to work with chameleon 2.0.

See the notes from the z3c.ptcompat package:

Update z3c.ptcompat implementation to use component-based template engine
configuration, plugging directly into the Zope Toolkit framework.

The z3c.ptcompat package no longer provides template classes, or ZCML
directives; you should import directly from the ZTK codebase.

Also, note that the ``PREFER_Z3C_PT`` environment option has been
rendered obsolete; instead, this is now managed via component
configuration.

Attention: You need to include the configure.zcml file from z3c.ptcompat
for enable the z3c.pt template engine. The configure.zcml will plugin the
template engine. Also remove any custom built hooks which will import
z3c.ptcompat in your tests or other places.

You can directly use the BoundPageTemplate and ViewPageTempalteFile from
zope.browserpage.viewpagetemplatefile if needed. This templates will implicit
use the z3c.pt template engine if the z3c.ptcompat configure.zcml is
loaded.

Page 7 of 12

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.