Gocept.jsform

Latest version: v3.0.3

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

Scan your dependencies

Page 4 of 6

2.1.0

==================

- If ajax result is HTML instead of JSON data, display HTML (which is in most
cases a 500 error or login page). (11838)

2.0.0

==================

- Render the token as the ``<option value>`` attribute, so we get the best of
both worlds: internally we deal with objects, but the DOM looks "normal" (and
other DOM-based libraries like select2 can interface with it).

- Package the browser resources as a bower package.

- Switch from json-template.js to Handbars.js for templating. (13804)

- Fixed a bug where using select fields with dynamic options (sources) triggered
a save request with empty value upon creation in the UI.

1.2.0

==================

- Improved handling of object and multiselect fields such that the values
loaded are actually just the values, with select options being passed as the
``source`` field option. This is an important backwards-incompatible change.

- Added a field option ``multiple`` that, when truthy and the selected type is
object, makes the field be considered a list of objects. When using the
default templates, this turns a select widget into multi-select.

- When loading values into a form via the JS API rather than via HTTP as JSON,
assume full objects, not tokens to be contained.

- Add textarea template.

- Added the concept of required fields which cannot be saved when blank.

- More Bootstrap 3 compatibility.

- Simplified HTML mark-up of form elements.

- Removed the package metadata's implicit dependency on the test extra.

- Use `classy <https://github.com/mitsuhiko/classy>`_ classes.

- Consider HTTP error responses unrecoverable errors. This distinguishes them
from time-outs and connection errors.

- Add ``loaded`` property on Form, a Deferred so clients can check whether
loading has finished. This is mainly helpful for tests, e.g.::

selenium.waitForEval(
'$("jsform").data("form") && '
'$("jsform").data("form").loaded.state()', '"resolved"')

- Expose the ``get_template`` function for reuse outside the Form class.

- If an empty string is specified as ``form_template``, just use the existing
form DOM node without applying any template.

- Add jQuery plugin ``$().jsform_submit_button(callback)`` that sets up a
button that saves the jsform and calls a function after the successful save.

1.1

================

- Propagate save message of server using ``after-save`` trigger.

- Added infrastructure for displaying and clearing status messages, use it for
announcing HTTP faults during AJAX calls.

- Display and clear field-related errors both at the widget and via status
messages.

- When saving data, count anything but a JSON response with a status value of
"success" as an error. Give up completely after an incomprehensible
response, retry on connection errors either after the next successful server
access for any other field, or when requested by a call to ``retry()``.

- Added an API method ``save_remaining()`` that causes any fields to be saved
that have not been modified so far. While this should only save the initial
values loaded from the server, it is useful to apply the same validation and
error handling to all fields.

- Added an API method ``when_saved(retry)`` that returns a promise that
aggregates any pending and completed save calls, either propagating the
retry behaviour of single fields (the default) or failing on server errors.

- Provide a visual clue and status message while saving a field.

- Some refactoring to improve code readability.

- Made code pass jshint check.

- Made default and currently not overrideable status message behaviour
compatible to bootstrap 3

- Properly unsubscribe change handlers when updating fields.

- Added simple localization.

1.0

================

- Remove console calls as they are not understood by all browsers.

0.8

================

- Fixed: jsform did not render in IE8 if form template started with line break.

Page 4 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.