Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Refactor: Update Terms & Conditions block showInForm display #240

Merged
merged 27 commits into from
Aug 9, 2023

Conversation

JoshuaHungDinh
Copy link
Contributor

@JoshuaHungDinh JoshuaHungDinh commented Aug 1, 2023

Description

This PR updates the "In form" agreement text display style for the Terms and conditions block. This display type originally was setup similar to the original agreement text for v2 forms, in where a user would need to open/reveal the agreement by clicking a show terms button. We have updated this by removing the "show terms" button and displaying the agreement text initially without the need to open/reveal it.

Additional updates include:

  • Includes new class to handle post request data for DesignPreview. This is required to allow the html attributes using kses_post(). So that the provided html tags for the Consent field & any other html field render properly in DesignPreview
  • Fix for applying the global attributes to the block correctly by passing the global settings through the window object
  • Updated default agreement text value to include a paragraph tag - replicates initial spacing for Interweave
  • Improved styling
  • Update Checkbox function name to CheckboxPlaceholder to improve readabillity

Affects

Terms & Conditions block

Visuals

Screen Shot 2023-08-02 at 9 55 13 AM Screen Shot 2023-08-02 at 9 56 29 AM

Testing Instructions

  • Verify global settings are used correctly upon block creation.
  • Select customize show terms in form & use the editor to edit the text.
  • View on Design Preview
  • View on Frontend

Pre-review Checklist

  • Acceptance criteria satisfied and marked in related issue
  • Relevant @unreleased tags included in DocBlocks
  • Includes unit tests
  • Reviewed by the designer (if follows a design)
  • Self Review of code and UX completed

@JoshuaHungDinh JoshuaHungDinh changed the title Refactor: Update Terms & Conditions block in form display Refactor: Update Terms & Conditions block showInForm display Aug 1, 2023
Copy link
Member

@rickalday rickalday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passed manual QA tests.

@kjohnson kjohnson merged commit e809886 into develop Aug 9, 2023
16 checks passed
@kjohnson kjohnson deleted the fix/terms-and-conditions-in-form-agreement branch August 9, 2023 18:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants