Skip to content

Releases: Chrico/wp-fields

2.3.2

25 Sep 14:49
513d4af
Compare
Choose a tag to compare

Element

  • fix Element::attributesForView() to return correct "disabled"-state in case the parent is disabled.

View/FormRow

  • add new selector "form-row--is-disabled".

View/Form

  • remove "value" from being rendered as <form>-attribute

2.3.1

19 Sep 10:53
0478372
Compare
Choose a tag to compare

Improvements on Form

  • Don't submit any data in case the Form is disabled.
  • Don't allow re-submit of submitted forms.
  • Allow inserting $inputData where the Form::name() is within that collection.
  • Set "submitted"-state in Form::submit() after $inputData is assigned to Elements.

2.3.0

19 Sep 06:34
bb27332
Compare
Choose a tag to compare

Element

  • Introduce new methods Element::withParent() and Element::parent() to keep track of the parent CollectionElement/Form and track "submission"-state on all Elements.
  • Introduced new method which prepares the "id" and "name" for rendering to take the Element parents into account.

Form, CollectionElement, Element

Reduced amount of methods which are overwritten and ensure that with*() methods are not callable after submission.

2.2.0

18 Sep 14:06
1a805c2
Compare
Choose a tag to compare

Improvements

  • Element // ensure that withOptions() calls internally withOption().
  • Element // ensure that withAttributes() calls internally withAttribute().

Testing

  • ElementFactoryTest // removes randomness from test cases.
  • workflows/php-qa.yml // execute all steps in parallel.
  • Add output for phpunit.

2.1.5

11 Sep 07:30
9cf5907
Compare
Choose a tag to compare

Form

Fixing bug where non-existing fields in data array caused to overwrite existing field values (defaults) with empty values.

2.1.4

11 Jul 13:36
fbc016f
Compare
Choose a tag to compare
  • Element // improve return types by using "static" instead of the specific class or implemented interface.

2.1.3

03 Jul 09:09
d52141d
Compare
Choose a tag to compare
  • AttributeFormatterTrait // add the Element::id() as "element" to the selector.

2.1.2

03 Jul 08:06
f6f948a
Compare
Choose a tag to compare
  • Checkbox/Radio // no escaping for choice labels. It can be possible that those labels actually have HTML in text.

2.1.1

28 Jun 13:48
6bd447a
Compare
Choose a tag to compare
  • Form // fix handling of isValid when the Form has errors. Add missing method mock in FormTest::testIsValid().

2.1.0

28 Jun 12:13
64bc402
Compare
Choose a tag to compare

ChoiceList

Refactor internal structure to support "disabled"-attribute for checkbox, radio and options and allow in future to add more settings like "help"-text.

View

Complete refactor of markup to move away from <table> and be more flexible with styling elements. All elements on output will now have the "type" as modifier on the wrapper. Additionally the <label> and Element itself will now also have a CSS class including the type.

View/Button

Introduce new "reset"- and "button"-types which will render a <button>

Element

Filter- and Validator-callbacks now will get the Element itself as second parameter.

QoL

  • Cleanup variables and docBlocks.
  • Update documentation