=======
CHANGES
=======

Version 1.5.0 (7/18/2007)
-------------------------

- 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.


Version 1.4.0 (6/29/2007)
-------------------------

- 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.


Version 1.3.0 (6/22/2007)
-------------------------

- Feature: In an edit form applying the data and generating all necessary
  messages was all done within the "Apply" button handler. Now the actual task
  of storing is factored out into a new method called "applyChanges(data)",
  which returns whether the data has been changed. This is useful for forms
  not dealing with objects.

- Feature: Added support for ``hidden`` fields. You can now use the ``hidden``
  mode for widgets which should get rendered as ``<input type="hidden"
  />``.

  Note: Make sure you use the new formui templates which will avoid rendering
        labels for hidden widgets or adjust your custom form macros.

- Feature: Added ``missing_value`` support to data/time converters

- Feature: Added named vocabulary lookup in ``ChoiceTerms`` and
  ``CollectionTerms``.

- Implemented support for ``FileUpload`` in ``FileWidget``.

  * Added helper for handling ``FileUpload`` widgets:

    + ``extractContentType(form, id)

      Extracts the content type if ``IBytes``/``IFileWidget`` was used.

    + ``extractFileName(form, id, cleanup=True, allowEmtpyPostFix=False)``

      Extracts a filename if ``IBytes``/``IFileWidget`` was used.

      Uploads from win/IE need some cleanup because the filename includes also
      the path. The option ``cleanup=True`` will do this for you. The option
      ``allowEmtpyPostFix`` allows you to pass a filename without
      extensions. By default this option is set to ``False`` and will raise a
      ``ValueError`` if a filename doesn't contain an extension.

  * Created afile upload data converter registered for
    ``IBytes``/``IFileWidget`` ensuring that the converter will only be used
    for fiel widgets. The file widget is now the default for the bytes
    field. If you need to use a text area widget for ``IBytes``, you have to
    register a custom widget in the form using::

      fields['foobar'].widgetFactory = TextWidget

- Feature: Originally, when an attribute access failed in Unauthorized or
  ForbiddenAttribute exceptions, they were ignored as if the attribute would
  have no value. Now those errors are propagated and the system will fail
  providing the developer with more feedback. The datamanager also grew a new
  ``query()`` method that returns always a default and the ``get()`` method
  propagates any exceptions.

- Feature: When writing to a field is forbidden due to insufficient
  priviledges, the resulting widget mode will be set to "display". This
  behavior can be overridden by explicitely specifying the mode on a field.

- Feature: Added an add form implementation against ``IAdding``. While this is
  not an encouraged method of adding components, many people still use this
  API to extend the ZMI.

- Feature: The ``IFields`` class' ``select()`` and ``omit()`` method now
  support two ketword arguments "prefix" and "interface" that allow the
  selection and omission of prefixed fields and still specify the short
  name. Thanks to Nikolay Kim for the idea.

- Feature: HTML element ids containing dots are not very good, because then
  the "element#id" CSS selector does not work and at least in Firefox the
  attribute selector ("element[attr=value]") does not work for the id
  either. Converted the codebase to use dashes in ids instead.

- Bug/Feature: The ``IWidgets`` component is now an adapter of the form
  content and not the form context. This guarantees that vocabulary factories
  receive a context that is actually useful.

- Bug: The readonly flag within a field was never honored. When a field is
  readonly, it is displayed in "display" mode now. This can be overridden by
  the widget manager's "ignoreReadonly" flag, which is necessary for add
  forms.

- Bug: The mode selection made during the field layout creation was not
  honored and the widget manager always overrode the options providing its
  value. Now the mode specified in the field is more important than the one
  from the widget manager.

- Bug: It sometimes happens that the sequence widget has the no-value token as
  one element. This caused ``displayValue()`` to fail, since it tried to find
  a term for it. For now we simply ignore the no-value token.

- Bug: Fixed the converter when the incoming value is an empty string. An
  empty string really means that we have no value and it is thus missing,
  returning the missing value.

- Bug: Fix a slightly incorrect implementation. It did not cause any harm in
  real-world forms, but made unit testing much harder, since an API
  expectation was not met correctly.

- Bug: When required selections where not selected in radio and checkbox
  widgets, then the conversion did not behave correctly. This also revealed
  some issues with the converter code that have been fixed now.

- Bug: When fields only had a vocabulary name, the choice terms adaptation
  would fail, since the field was not bound. This has now been corrected.

- Documentation: Integrated English language and content review improvements
  by Roy Mathew in ``form.txt``.


Version 1.2.0 (5/30/2007)
-------------------------

- Feature: Added ability to change the button action title using an ``IValue``
  adapter.


Version 1.1.0 (5/30/2007)
-------------------------

- Feature: Added compatibility for Zope 3.3 and thus Zope 2.10.


Version 1.0.0 (5/24/2007)
-------------------------

- Initial Release
