Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gutenpack: Add/contact form to the gutenberg editor (#10537)
* Add the gutenberg contact form gutenberg blocks * Gutenpack: Add contact form block * Update form block to use contact-form * Add do_blocks call to the contact render form * Add register_contact_form_blocks block method * Provide default labels * Updates to fix tests the default value of a lable should be null of the type is not set * Minor fixes * Use the jetpack_register_block call to register the contact form blocks Make sure we load them before we load the gutenberg blocks * Bug fix: Only display selections when the option has a value. * Added tests that show what the form doesn't recieve a lavel that we defaul to the default label. * Add tests that shows that we remove empty options when we pass an string containing the empty options * Minor bug fix. Add closing div to the phone field. * Add support for class added in gutenberg * Refactored field Render method so that it is easier to follow. More DRY field render method * Minor fixes * Add unitests for output. * Unit Test fixes so that they work with older version of PHP * Fix: Add more liberal url validaton This removed the validation error when a user doesn't add a http:// or https:// infront of the url. * Improved pattern for the url. * Revert "Improved pattern for the url." This reverts commit 105fcca. * Revert "Fix: Add more liberal url validaton" This reverts commit 0f1a632. * Add support for the defaultValue block attribute * Gutenberg: Conact form ensure we are exposing the contact form's sub-blocks in block availability data. the sub blocks will not be in blocks-manifest.json, so we'll need to ensure we are also including blocks that have been registered internally within jetpack * Fix the tests again :P * Fixes indentation of the js code * Remove comment * Add php doc block for remove_empty * Fixes ugly quotes. * Fix the tests since we are expecting the double quotes now. * With escaped quotes
- Loading branch information