Skip to content

Latest commit

 

History

History
147 lines (114 loc) · 5.61 KB

CHANGELOG.md

File metadata and controls

147 lines (114 loc) · 5.61 KB

Change Log

  • Require UserFrosting 5.1
  • Update PHPUnit 10
  • Update PHP & JS dependencies
  • Added support for UserFrosting 5
  • Data passed to forms can be mixed type, not only string. Data will still be casted to string.
  • Merge #12 - Remove fa class to allow for FA v5 fas & fab - Thanks @phillmac
  • Fixed issue where the value of an element whose name is using dot notation wouldn't be found in the corresponding multidimensional array.
  • Form nows register element class, instead of using hardcoded string.
  • Form has new registerType method to register new custom elements. getType(string $name) and getTypes() can be used to get the class for a type (eg. 'text', 'select', etc.) abd a list of types. removeType will unregister a type.
  • Form still fallback to Text type if type is not found, but this can now be changed with getDefaultType and setDefaultType.
  • Form uses RequestSchemaRepository instead of RequestSchemaInterface.
  • Stricter PHP7 type throughout.
  • Renamed BaseInput to Input.
  • Input has new setValue, getElement, setElement, getName & setName methods.
  • Checkbox element now pass the value to non-binary checkbox.
  • FormGeneratorController uses strict typing.
  • Finished tests and fix tests namespace. 100% coverage!
  • Added PHP-CS-Fixer, PHPStan, StyleCI configuration.
  • Updated Travis setup.
  • Added successCallback option
  • Support for UserFrosting 4.2
  • Added support for Repository
  • Fix issue when setting data that is a collection
  • formSuccess and confirmSuccess events now include the request data as a second argument
  • Fix icon in textarea macro
  • Added modal-large template file.
  • Fix issue with binary checkbox tests.
  • Fix Text input style when no icon is added
  • Added binary option for checkbox to disable UF binary checkbox system (bool; default true).
  • Add necessary HTML to disable submit and cancel button in modal form.
  • New $form->setOptions function to set options of a select element. Shortcut for using setInputArgument and setValue.
  • Fix issue with error alert no displaying on confirmation dialog
  • Initialize ufAlert if not already done
  • Autofocus first form field when modal is displayed
  • Refactored the javascript plugin
  • Added new events
  • Added new redirectAfterSuccess boolean option
  • Fix warning with select macro
  • Fix issue with the select macro
  • Renamed macro templates with the *.html.twig extension
  • Completely refactored how form fields are parsed, including how default value are defined. Each input type now defines it's own class for defining default values and transforming some input.
  • Twig templates updated to reflect the new parser.
  • Twig macros changed from *.generate(name, value) to *.generate(input).
  • Bool type changed to checkbox.
  • Removed the number Twig template (Will use the text input one).
  • Added unit tests.
  • Support for any attributes in the schema. For example, if you need to add a data attribute to a field, your schema would be:
"myField" : {
    "form" : {
        "type" : "text",
        "label" : "My Field",
        "icon" : "fa-pencil",
        "data-something" : "blah"
    }
}
  • Updated for UserFrosting v4.1.x

The custom RequestSchema have been removed. Instead of building the form directly on the schema using $schema->initForm(), you now create a new Form using $form = new Form($schema) and go on from there. Handling complex schema can now be done using the new loader system from UF 4.1.

$schema->generateForm(); has also been changed to $form->generate();.

  • Bug fixes

1.0.0

  • Initial release