Z3c.form

Latest version: v5.1

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

Scan your dependencies

Page 11 of 12

1.8.1

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

- Bug: Fixed a bug that prohibited groups from having different contents than
the parent form. Previously, the groups contents were not being properly
updated. Added new documentation on how to use groups to generate
object-based sub-forms. Thanks to Paul Carduner for providing the fix and
documentation.

1.8.0

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

- Feature: Implemented ``IDisplayForm`` interface.

- Feature: Added integration tests for form interfaces. Added default class
attribute called ``widgets`` in form class with default value ``None``. This
helps to pass the integration tests. Now, the ``widgets`` attribute can also
be used as a indicator for updated forms.

- Feature: Implemented additional ``createAndAdd`` hook in ``AddForm``. This
allows you to implement create and add in a single method. It also supports
graceful abortion of a create and add process if we do not return the new
object. This means it can also be used as a hook for custom error messages
for errors happen during create and add.

- Feature: Add a hidden widget template for the ``ISelectWidget``.

- Feature: Arrows in the ordered select widget replaced by named entities.

- Feature: Added ``CollectionSequenceDataConverter`` to ``setupFormDefaults``.

- Feature: Templates for the CheckBox widget are now registered in
``checkbox.zcml``.

- Feature: If a value cannot be converted from its unicode representation to a
field value using the field's ``IFromUnicode`` interface, the resulting type
error now shows the field name, if available.

- Bug: ``createId`` could not handle arbitrary unicode input. Thanks to
Andreas Reuleaux for reporting the bug and a patch for it. (Added
descriptive doctests for the function in the process.)

- Bug: Interface invariants where not working when not all fields needed for
computing the invariant are in the submitted form.

- Bug: Ordered select didn't submit selected values.

- Bug: Ordered select lists displayed tokens instead of value,

- Bug: ``SequenceWidget`` displayed tokens instead of value.

1.7.0

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

- Feature: Implemented ``ImageButton``, ``ImageAction``, ``ImageWidget``, and
``ImageFieldWidget`` to support imge submit buttons.

- Feature: The ``AttributeField`` data manager now supports adapting
the content to the fields interface when the content doesn't implement
this interface.

- Feature: Implemented single checkbox widget that can be used for boolean
fields. They are not available by default but can be set using the
``widgetFactory`` attribute.

- Bug: More lingual issues have been fixed in the documentation. Thanks to
Martijn Faassen for doing this.

- Bug: When an error occurred during processing of the request the
widget ended up being security proxied and the system started
throwing ``TraversalError``-'s trying to access the ``label`` attribute of
the widget. Declared that the widgets require the ``zope.Public``
permission in order to access these attributes.

- Bug: When rendering a widget the ``style`` attribute was not honored. Thanks
to Andreas Reuleaux for reporting.

- Bug: When an error occurred in the sub-form, the status message was not set
correctly. Fixed the code and the incorrect test. Thanks to Markus
Kemmerling for reporting.

- Bug: Several interfaces had the ``self`` argument in the method
signature. Thanks to Markus Kemmerling for reporting.

1.6.0

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

- Feature: An event handler for ``ActionErrorOccurred`` events is registered
to merge the action error into the form's error collectors, such as
``form.widgets.errors`` and ``form.widgets['name'].error`` (if
applicable). It also sets the status of the form. (Thanks to Herman
Himmelbauer, who requested the feature, for providing use cases.)

- Feature: Action can now raise ``ActionExecutionError`` exceptions that will
be handled by the framework. These errors wrap the original error. If an
error is specific to a widget, then the widget name is passed to a special
``WidgetActionExecutionError`` error. (Thanks to Herman Himmelbauer, who
requested the feature, for providing use cases.)

- Feature: After an action handler has been executed, an action executed event
is sent to the system. If the execution was successful, the event is
``ActionSuccessfull`` event is sent. If an action execution error was
raised, the ``ActionErrorOccurred`` event is raised. (Thanks to Herman
Himmelbauer, who requested the feature, for providing use cases.)

- Feature: The ``applyChanges()`` function now returns a dictionary of changes
(grouped by interface) instead of a boolean. This allows us to generate a
more detailed object-modified event. If no changes are applied, an empty
dictionary is returned. The new behavior is compatible with the old one, so
no changes to your code are required. (Thanks to Darryl Cousins for the
request and implementation.)

- Feature: A new ``InvalidErrorViewSnippet`` class provides an error view
snippet for ``zope.interface.Invalid`` exceptions, which are frequently used
for invariants.

- Feature: When a widget is required, HTML-based widgets now declare a
"required" class.

- Feature: The validation data wrapper now knows about the context of the
validation, which provides a hook for invariants to access the environment.

- Feature: The BoolTerms term tokens are now cosntants and stay the same, even
if the label has changed. The choice for the token is "true" and "false". By
default it used to be "yes" and "no", so you probably have to change some
unit tests. Functional tests are still okay, because you select by term
title.

- Feature: BoolTerms now expose the labels for the true and false values
to the class. This makes it a matter of doing trivial sub-classing to
change the labels for boolean terms.

- Feature: Exposed several attributes of the widget manager to the form for
convenience. The attributes are: mode, ignoreContext, ignoreRequest,
ignoreReadonly.

- Feature: Provide more user-friendly error messages for number formatting.

- Refactoring: The widget specific class name was in camel-case. A converntion
that later developed uses always dash-based naming of HTML/CSS related
variables. So for example, the class name "textWidget" is now
"text-widget". This change will most likely require some changes to your CSS
declarations!

- Documentation: The text of ``field.txt`` has been reviewed linguistically.

- Documentation: While reviewing the ``form.txt`` with some people, several
unclear and incomplete statements were discovered and fixed.

- Bug (IE): In Internet Explorer, when a label for a radio input field is only
placed around the text describing the choice, then only the text is
surrounded by a dashed box. IE users reported this to be confusing, thus we
now place the label around the text and the input element so that both are
surrounded by the dashed border. In Firefox and KHTML (Safari) only the
radio button is surrounded all the time.

- Bug: When extracting and validating data in the widget manager, invariant
errors were not converted to error view snippets.

- Bug: When error view snippets were not widget-specific -- in other words,
the ``widget`` attribute was ``None`` -- rendering the template would fail.

1.5.0

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

- Feature: Added a span around values for widgets in display mode. This allows
for easier identification widget values in display mode.

- Feature: Added the concept of widget events and implemented a particular
"after widget update" event that is called right after a widget is updated.

- Feature: Restructured the approach to customize button actions, by requiring
the adapter to provide a new interface ``IButtonAction``. Also, an adapter
is now provided by default, still allowing cusotmization using the usual
methods though.

- Feature: Added button widget. While it is not very useful without
Javascript, it still belongs into this package for completion.

- Feature: All ``IFieldWidget`` instances that are also HTML element widgets
now declare an additional CSS class of the form "<fieldtype.lower()>-field".

- Feature: Added ``addClass()`` method to HTML element widgets, so that adding
a new CSS class is simpler.

- Feature: Renamed "css" attribute of the widget to "klass", because the class
of an HTML element is a classification, not a CSS marker.

- Feature: Reviewed all widget attributes. Added all available HTML attributes
to the widgets.

- Documentation: Removed mentioning of widget's "hint" attribute, since it
does not exist.

- Optimization: The terms for a sequence widget were looked up multiple times
among different components. The widget is now the canonical source for the
terms and other components, such as the converter uses them. This avoids
looking up the terms multiple times, which can be an expensive process for
some applications.

- Bug/Feature: Correctly create labels for radio button choices.

- Bug: Buttons did not honor the name given by the schema, if created within
one, because we were too anxious to give buttons a name. Now name assignment
is delayed until the button is added to the button manager.

- Bug: Button actions were never updated in the actions manager.

- Bug: Added tests for textarea widget.

1.4.0

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

- Feature: The select widget grew a new ``prompt`` flag, which allows you to
explicitely request a selection prompt as the first option in the selection
(even for required fields). When set, the prompt message is shown. Such a
prompt as option is common in Web-UIs.

- Feature: Allow "no value message" of select widgets to be dynamically
changed using an attribute value adapter.

- Feature: Internationalized data conversion for date, time, date/time,
integer, float and decimal. Now the locale data is used to format and parse
those data types to provide the bridge to text-based widgets. While those
features require the latest zope.i18n package, backward compatibility is
provided.

- Feature: All forms now have an optional label that can be used by the UI.

- Feature: Implemented groups within forms. Groups allow you to combine a set
of fields/widgets into a logical unit. They were designed with ease of use
in mind.

- Feature: Button Actions -- in other words, the widget for the button field
-- can now be specified either as the "actionFactory" on the button field or
as an adapter.

- Bug: Recorded all public select-widget attributes in the interface.

Page 11 of 12

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.