Skip to content

Releases: Chrico/wp-fields

2.3.2

Choose a tag to compare

@Chrico Chrico released this 25 Sep 14:49
513d4af

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

Choose a tag to compare

@Chrico Chrico released this 19 Sep 10:53
0478372

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

Choose a tag to compare

@Chrico Chrico released this 19 Sep 06:34
bb27332

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

Choose a tag to compare

@Chrico Chrico released this 18 Sep 14:06
1a805c2

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

Choose a tag to compare

@Chrico Chrico released this 11 Sep 07:30
9cf5907

Form

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

2.1.4

Choose a tag to compare

@Chrico Chrico released this 11 Jul 13:36
fbc016f
  • Element // improve return types by using "static" instead of the specific class or implemented interface.

2.1.3

Choose a tag to compare

@Chrico Chrico released this 03 Jul 09:09
d52141d
  • AttributeFormatterTrait // add the Element::id() as "element" to the selector.

2.1.2

Choose a tag to compare

@Chrico Chrico released this 03 Jul 08:06
f6f948a
  • Checkbox/Radio // no escaping for choice labels. It can be possible that those labels actually have HTML in text.

2.1.1

Choose a tag to compare

@Chrico Chrico released this 28 Jun 13:48
6bd447a
  • Form // fix handling of isValid when the Form has errors. Add missing method mock in FormTest::testIsValid().

2.1.0

Choose a tag to compare

@Chrico Chrico released this 28 Jun 12:13
64bc402

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