Release Notes
=============
### 5.0.0

#### Code Refactoring
- Upgraded to Typescript 2.0
- Converted all files to ES2015 modules
- Upgrade all syntax to ES2105 (most notably fat arrow functions)
- Upgrade all code to explicit types/no explicit any
- Upgrade all code to pass @vendasta/lint-config tslint and eslint configurations
- TODO: Bundle with webpack or rollupjs
- TODO: Refactor JS code to be a releaseable NPM module
- TODO: NPM build scripts, remove gulpfile.js, bower, etc.

#### BREAKING CHANGES
- Class `vForm` renamed to `VForm`
- Class `vFilter` renamed to `VFilter`
- `forms.js` now ships as a UMD module (still does not ship vendor code)
- ONLY `VForm` and `VFilter` are exported from the module
  - Currently ALL other classes are to be considered private to the library, and thus have undergone breaking naming changes.
  - More classes will be exposed from the module in the future.
- ALL callback functions from the VForm and VFilter classes have been removed. Use class inheritance to override functionality instead.
- ALL uses of knockout postbox removed.
  - For VFilter, this means you must call RemoveItem on the VFilter class itself, as opposed to VFilter previously listening for postbox topic `vFeedRemoveItem` and removing the item for you.
  - For the FileUpload control, this no longer means it will be publishing on the `vform/file-upload/add`, `vform/file-upload/delete`, and `vform/file-upload/error` topics.

### History before moving the frontend code

### 4.1.0
- add tokenSeparators kwarg to TagField (for select2 tokenSeparators)

### 4.0.2
- Fix css binding for left and right custom buttons
- Fix the interface definition of button options

### 4.0.1
- Add a title attribute to the file upload preview link.

### 4.0.0
- Publish all file upload data on knockout postbox topics. This changes some of the object attribute names which are
  published in the data.

### 3.13.0
- Add knockout postbox topic for file upload errors.

### 3.12.1
- Renamed vsource control label 'Internet Data Provider' to 'Data Provider'

### 3.12.0
- Added `enableInternetDataProviders` as an optional field for vsource control

### 3.11.0
- Added LineSeparator and TextSeparator fields.

### 3.10.0
- fix geopicker not loading for customers on new domains

### 3.9.0
- allow arbitrary field attributes to be set through **kwargs in set_field_attributes

### 3.8.2
- updated the default (empty value) label for the countrystate field to be "Select a State / Prov / Region".

### 3.8.1
- changed the countrystate field's updateField method to set the state to the selected state, if available.

### 3.8.0
- changed infinite scrolling behaviour to load before user reaches page end

### 3.7.5
- simplify logic of country state's state visibility to run off a computed variable and work for manually updating country state values

### 3.7.4
- fix country state field to hide state when it is initialized with a country that does not have states

### 3.7.3
- fix the enable binding for the switch control

### 3.7.2
- `get_state_options_for_country_code` returns an empty list again after changes in 3.7.1

### 3.7.1
- Fix bug where countrystate field would show a checkmark when the state field was empty

### 3.7.0
- Move the handle_fileupload function down into the file handler
- Remove the Replace File button from the file and image upload controls
- Allow passing ['*'] to the acceptedMimeTypes to allow for any mime types

### 3.6.1
- Radio buttons will not be cleared when the form is cleared.

### 3.6.0
- Add the helpBlock to dropdown field

### 3.5.3
- Change RadioField's tooltip to resemble other field's tooltips and not be a help block

### 3.5.2
- Updated VFormHandler to resolv the webapp/webapp2 conflicts.
- Changed VFormHandler._assert_fields_and_form_configured() to an instance method.

### 3.5.1
- Fix the problem of infinite scrolling when Chrome is zoomed in/out

### 3.5.0
- Call postSubmit in form submit fail case

### 3.4.0
- Add clearAll method to vForm

### 3.3.2
- Fix the problem where duplicate fields would show up if they were defined in the fields list without being nested
  under a section

### 3.3.1
- Handle decoding of unicode characters in context args
- Allow form fields without a section to render

### 3.3.0
- Better unicode encoding for lists of context args

### 3.2.0
- New control, TagControl/TagField
  - Uses select2 knockout binding and implements some of select2's "tags" functionality

### 3.1.0
- adding the ability to skip sources in the source control
  (it can already skip categories, but I need to be more specific)

### 3.0.0
- Typescript
- Browserify to inline the templates from external files
- BREAKING CHANGES:
-- Uses ES2015 classes instead of inheritance.js. Subclasses of vForm will need to use prototypical inheritance.

### 2.13.0
- Added ability to download file from the file uploader

### 2.12.0
- Extracted flash messaging logic to support client side control via cookies

### 2.11.0
- Add two postbox channels for hooking into successful file uploads and deletions.
  + "vform/file-upload/add" for additions
  + "vform/file-upload/delete" for deletions

### 2.10.2
- Made the form submit button display be disabled if disableFormSubmit is on

### 2.10.1
- Made the disableFormSubmit default to disableFormSubmit on the options parameter or false if not present.

### 2.10.0
- Added disableFormSubmit to vForm to be able to disable the submit button.
- Fixed a ValueError being thrown if you try to set_field_attribute on a complex control without ever calling set_value on it.

### 2.9.1
- Removed the alerts for console logging
- Removed legacy test app, cleaned up current test app
- Started bower config files and gulpfile.js

### 2.9.0
- Added unauthenticated and unauthorized callbacks

### 2.8.2
- Minor refactor to allow an override of the checks for `FORM` and `FIELDS` on `VFormHandler.__init__`

### 2.8.1
- Fix bug where State field value was not correctly updated on Country value change

### 2.8.0
- Raise a NotImplementedError if get_fileurl is not overwritten on a VFileUploadHandler

### 2.7.0
- Add afterRender hook for feed item templates.

### 2.6.0
- Added `DateRangePickerField` field

### 2.5.4
- Check `donecallback` to make sure it's a function before calling it

### 2.5.3
- Fix styling issue with multitext fields

### 2.5.2
- Check for typeof value while before trimming in _validate, fixes bug introduced in previous version

### 2.5.1
- Validate form fields by removing trailing and beginning whitespaces in form field values

### 2.5.0
- Added a hidden input field to all forms generated by vform, to prevent autofill in Chrome

### 2.4.2
- Switched to using knockout conditionals, rather than the 'if' binding, for showing the cancel button.

### 2.4.1
- Added serializeField to handle either string or object for Hours of Operation

### 2.4.0
- Adding custom buttons for the footer.

### 2.3.1
- Allow lat: 0 and lon: 0 in GeopickerFields

### 2.3.0
- Added option to have a fixed footer on vforms

### 2.2.1
- Fixed bug for validating the checkboxesField (value can be None or [])

### 2.2.0
- Added validation for checkboxesField
- Added support for icons in checkboxesField
- Added list datatype for checkboxesField

### 2.1.6
- Fixed bug where state would not be cleared if country with no states was selected

### 2.1.5
- The validate method for the DateField now validates either a date string or a date type.

### 2.1.4
- Update iconCheckboxesControl to current inheritance idiom

### 2.1.3
- Handle type error exception in DateField validation function.
- Correct the error message in the validation for the DateControl field.

### 2.1.2
- Default numeric extender to null instead of 0
- More specific error messaging on form validation error gritter

### 2.1.1
- Fix bug with the validation for the DateControl field.

### 2.1.0
- Added support for a minimum and maximum value on the DateField control.

### 2.0.3
- Added error messaging to Star Rating control

### 2.0.2
- Added IconCheckboxesField

### 2.0.1
- MultiSelectControls now leverage the select2 bindinghandler to update each other both ways
- Removed update from bindinghandler, no longer needed

### 2.0.0
- **Breaking changes**: text fields, numerical fields, and bool fields now ENFORCE these types, they can't be set to null.
- Enforced fields have defaults, text-fields default to '', numerical to 0, and boolean to false.
- Refactor inheritance model to work better and not overwrite subscriptions
- Remove onValueChange function, it was better suited as a subscription on self.value

### 1.1.5
- added valueAllowUnset flag to countrystate which cleans up ability to set states dynamically.

### 1.1.4
- Fixed a bug where multiselectControls would not visually update their values in the template

### 1.1.3
- Fixed a bug with star rating fields. The stars were not displaying. Now they do.
- vform now requires knockout 3.2.0 or higher.

### 1.1.2
- Fix issue where FormValidationError raised from a validate_arg_% method would have
  500 status instead of 400

### 1.1.1
- No longer show status icons if displayStatusIcons is disabled.
- turned computeStatusIcons into ko.computed as self.statusIcons

### 1.1.0
- Added support for rendering a section for sorting in a vfilter

### 1.0.1
- Now clears all server messages on submission
- Enforces 'maxMultiples' limit on multi fields

### 1.0.0
- Refactors validation to utilize the inheritance model we've layed out.
- Now uses value read/write computeds to set/get values on ALL fields (including multivalues)
- Properly computes status icons and errors for all fields whenever their values are changed
- Shows serverside errors beside the relevant fields
- Can now set values on select2 boxes dynamically.
- initialization of a field now simply sets the value() computed to be initialData.value

### 0.51.0
- Fixed bug where error messages were not being displayed for file & image fields.

### 0.50.0
- Back button shouldn't be required

### 0.49.0
- Added missing 'var self = this' fixing NB-1227

### 0.48.0
- Added remove icons to multivalue fields
- Added catch for server error 'Customer ID already exists'

### 0.47.0
- Added loading icons to vform.

### 0.46.3
- Refactor _validate method to take in a 'required' field
- Change how 'This field is required' error is set on fields

### 0.46.2
- Fix multiValueFields by adding correct onValueChange subscriptions
- Adjust templates to display statusIcons forEach field

### 0.46.1
- Type added to back button to prevent default 'enter' action

### 0.46.0
- Back button support if backUrl is supplied
- Otherwise performs formCancel action

### 0.45.3
- Added fix for countryState fields to allow setting country and state dynamically with setFieldValue.
- There was an issue with any values that we set being overwritten when updateValues was called after
  validation during 'formAlteringElementChanged'.

### 0.45.2
- Uploading files with unicode characters in their name is now supported

### 0.45.1
- Status Icon support for multiValueFields
- Error icons always display

### 0.45.0
- Client control classes and status icons

### 0.44.0
- Do not require locked args

### 0.43.0
- update vautil

### 0.42.0
- Added grid checkboxes field

### 0.41.0
- Added star rating field.

### 0.40.0
- Added lock icons to country and state selectors

### 0.39.0
- Add ids to 'select' elements

### 0.38.1
- Ensure that a gritter always shows on error when the responseText is not JSON

### 0.38.0
- Separate v-filter-template to allow overriding with custom style

### 0.37.0
- Added Hours of Operation control

### 0.36.1
- Fixed bug allowing multiselect field to update when get_options()

### 0.36.0
- Added geolocation picker control

### 0.35.2
- fix mimetype behaviour for all non CSV mimetypes.

### 0.35.1
- fix broken csv mimetype behaviour.  Could not submit csvs in some cases, csvs did not show up in the select window
  for some browsers in some operating systems.

### 0.35.0
- Load vsource control variables from field definition or context.

### 0.34.1
- clear validation message on vtax field after value is updated

### 0.34.0
- added VFormModelHandler to generate simple forms over ndb.Model

### 0.33.1
- Roll vApi / vAutil & update usages accordingly

### 0.33.0
- Ignore validation messages set by the server when determining whether the form is ready to submit

### 0.32.1
- Fixed the switch control's binding (now properly sends state to server side)

### 0.32.0
VFilter Changes:
- Added ability to use components instead of templates
- Added ability to pass the template name as a string directly rather than always needing a function
- Renamed some of the functions and options for a cleaner interface (but maintained the legacy names
  for backwards compatibility)
- Added ability to hide the filter
- Added a very basic infinite scroller (only loads when bottom of page is hit)
- Increased test coverage and tested the new features
- Added documentation around the options that can be used for vfilter

### 0.31.3
- Set the loading state at beforeSend of ajax request

### 0.31.2
- Properly reset the loading state of the submit button when the success URL begins with a '#'.

### 0.31.1
- First multi text-field input no longer has text go underneath the tooltip icon.

### 0.31.0
- Added set_field_message function

### 0.30.0
- Allow image/pjpeg as a mime type (only seen in IE8)

### 0.29.0
- Allow placeholder label for dropdown includeBlank option
- Allow required to be changed by set_field_attributes

### 0.28.0
- Context args are now available within validate_credentials

### 0.27.1
- Added tooltip to multitext fields

### 0.27.0
- Added url field
- Changed email field to use the vapi regex
- vForm now requires vapi 2.### 0.3

### 0.26.3
- Put the helpblock back into the dropdown template

### 0.26.2
- Fixed the cursor subscription generated by 25.0 refactor

### 0.26.1
- Fixed the tooltip and ID for the search control
- Ignore None values in get_updated_context in vFilter

### 0.26.0
- Allow Dropdown fields to support select2

### 0.25.0
- Refactor getField, setField, expose field objects via getRawField, allow easy subscriptions to field values

### 0.24.0
- Implemented a new multiselect field utilizing select2

### 0.23.2
- Consolidate the 3 sections where a control group field, was specified to use common code

### 0.23.1
- Change message when file has been saved.

### 0.23.0
- Allow for vFilter to render a custom template.
- Update the sample app to inlcude a vfilter sample
- Add search field for usage with vfilter (requires knockout 3.2 or higher)
- Cleanup the throttles to not apply to all control types to fix the throttle vfilter bug

### 0.22.3
- Remove unused default vtax field css class.

### 0.22.2
- Allow section descriptions to show as text under section headers.

### 0.22.1
- Update file upload template to match the image upload template.

### 0.22.0
- Allow for an optional fieldset class parameter when creating Sections. An example usage of this would be to
 specify "two-column", which will allow for a two column form.

### 0.21.2
- Various pylint fixes.
- Changed the signature on VImageUploadHandler.get_image() from (file_result, **kwargs)
    to (field_storage) since it is the only kwarg actually used in that method.

### 0.21.1
- Added Locked Fields example to the sample app.

### 0.21.0
- Added additional field attributes to set_field_attributes.

### 0.20.1
- Fixing some of the sample app fields to use set_field_attributes
- Moved global.html into the sample_app and renamed it to forms-global.html

### 0.20.0
- Added tinymce control

### 0.19.0
- BREAKING CHANGE if setting field attributes through set_value and set_options.
  Use set_field_attributes instead.

### 0.18.0
- Support tooltips on vTax fields

### 0.17.0
- Added file and image upload control.

### 0.16.0
- Added the ability to provide icon class for sections
- Allow feed item header to be customized

### 0.15.1
- Small bug fix in _command_options for when a field definition does not have a control type

### 0.15.0
- Added countrystate control type.

### 0.14.0
 - BREAKING CHANGE if using vFilter. Knockout 3.2 and the knockout postbox library are required. Both are
 available from VFF.

### 0.13.1
 - Moved the sample app code into the vform lib proper for easy importing in other apps (i.e. VFF)
### 0.13.0
 - Added the ability to lock fields, and the ability to specify lock messages

### 0.12.1
- Log and show generic gritter error message on form submit unexpected errors, instead of using alerts

### 0.12.0
 - Added support for a form section to configure a tooltip
### 0.11.3
 - Added the readonly/disabled feature to the new vtax control
### 0.11.2
 - clear cursor when manually submitting form vFilter
 - only clear checkboxes within vFilter clearAll

### 0.11.1
 - Added Styling/processing state of the load more button for vfilter

### 0.11.0
 - Initial commit of vFilter. Only includes extreme basic functionality
 - Includes a refactor of the vForm view model callbacks to allow for class level overriding for vForm subclasses

### 0.10.1
 - fix to set ensure initial value of vtax control is set

### 0.10.0
 - new and improved taxonomy category search box control
 - **IMPORTANT** must now include the select2 CSS & JS as per instructions on VFF

### 0.9.8
 - added check for ajax request being cancelled in order suppress error message in ajax "fail" callback
 - fixed error message in ajax "fail" callback to be slightly clearer

### 0.9.7
 - refactor duplicated json parsing logic in forms.js into a common function

### 0.9.6
 - pass json formatted data in postSubmitCallback

### 0.9.5
 - Added field objects which can be used for form definitions instead of dictionaries

### 0.9.4
 - Added a subscription to the value observable on the vFormField model that validates
 the field and clears the error message (if there was any).

### 0.9.3
 - Added support for colorpicker input

### 0.9.2
 - Fix broken password template

### 0.9.1
 - Fix vform to work in ie8

### 0.9.0
 - Added vsource control type, like vtax control, it also requires coresdk.

-### 0.8.1
 - Fixed the switch control so it actually works now!

### 0.8.0
 - Added vtax control type - please note that the coresdk is required in order to use it, see config.py

### 0.7.4
 - Fixed bug where cancelCallback was not implemented

### 0.7.3
 - Updated vform labels (label, checkboxes and radio) to use html binding and allow it to be styled

### 0.7.2
 - No longer allowing the form to be submitted if any fields are invalid
 - Converting value of fields with DATATYPE float and integer before processing
 - Ensuring 0 is displayed properly in initial data
 - Fixed the include_blank option (wrong key in frontend)

### 0.7.1
 - Re-fixed checkboxes javascript (wasn't correctly updated in the "alters form" case)

### 0.7.0
 - Fixed the radio buttons (weren't bound to the field value)
 - Fixed the checkboxes (weren't bound to the field values, weren't getting sent as list of strings)
 - Show gritter messages (that were set via cookies) for forms that were not client-side redirected
 - override vApi's validate_required_args to raise a vForm-specific CompositeFieldValidationError
 - Fixed the backend's ability to set the visible, enabled, etc options
 - Made options non-required on set_options so that you can update visible, enabled, etc without changing the options
 - Moved some duplicated html into js variables
 - including the parent name on the id of radio buttons and checkboxes
 - bugfix: u'undefined' in multitext POST data
 - added a "legend" for "*Required Fields"

### 0.6.0
 - Fixed a major bug where fields were being shared across all forms in a page
 - Allowing the list type in set_value so multitext fields can be pre-populated
 - Fixes ENABLED for multitext fields
 - Multitext fields backed by an empty list now show a field
 - Hides the 'Add <label>' link for disabled multitext inputs
 - Hides the textarea tooltip if no message is set (to avoid an empty div)
 - Adds the CONTROL_GROUP_CLASS field configuration for adding extra CSS classes to a field
 - Added the control-label class to checkboxes and radio templates

### 0.5.3
 - Add processing spinner on form submissions

### 0.5.2
 - Consider 'visible' when rendering the 'control-group' template

### 0.5.1
 - Fixed issue where dropdowns were not being defaulted correctly upon initialization
 - Added ability to set a field to an empty string to clear out a field on update.

### 0.5.0
 - Added ability to set gritter message cookies on the server-side
 - Added a new client-side js to display the cookie-based gritter messages

### 0.4.0
 - BREAKING CHANGE: Do not override validate_credentials(), instead override check_credentials().
   This should be a simple text change; check_credentials should return True/False.
 - enforce field and section naming convention r'^[a-z][a-zA-Z0-9\_\.]*$'
 - removed the VForm-specific args from args passed to process() and get_options() (e.g., __vformctx__, etc.)

### 0.3.1
 - Added type checking to the AJAX responses to handle the case where the browser parses the response into JSON for us
 - Wrapped the context with encodeURIComponent before all AJAX requests

### 0.3.0
 - Added ability to specify FORM instead of FIELDS/FORM_SECTIONS (easier notation for sectioned forms)
   - see VFormHandler docstring for details
 - Old FIELDS/FORM_SECTION notation is still supported (i.e., not a breaking change)
 - Fixed a bug where FormData.set_value() would not allow boolean, datetime.

### 0.2.2
 - Fixed a bug where setting a value to be selected for a dropdown would not be defaulted as selected

### 0.2.1
 - Fixed a bug where we were not url encoding the context in the client

### 0.2.0
 - Added tooltips and error messages to all controls (some controls were missed in original release)
 - Fixed some pylint issues
 - Removed some TODO comments

### 0.1.0
 - The first official release of VForm
 - Includes support for basic form elements and sections
 - Form HTML is inserted into <form> element via AJAX
 - Client-side and server-side validation support for basic types
 - Basic data type support: telephone, email, url, integer, string, boolean, date, time, datetime
 - Basic control type support: text, textarea, passord, hidden, radio, dropdown, multiple checkboxes,
   html5 date, time, datetime selectors, switch, and checkbox
