Skip to content

Commit

Permalink
added in disclaimer
Browse files Browse the repository at this point in the history
  • Loading branch information
rrusher committed Jun 5, 2024
1 parent f4be7af commit 88b9948
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
8 changes: 7 additions & 1 deletion blocks/contact-form/contact-form.css
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,13 @@
display: flex;
justify-content: flex-start;
margin-bottom: 10px;
cursor: pointer;
}


.contact-form.block form.contact-form .agent div.disclaimer {
font-size: var(--body-font-size-xxs);
line-height: var(--line-height-s);
color: var(--dark-grey);
}

.contact-form.block form.contact-form .agent > div:first-child {
Expand Down
3 changes: 3 additions & 0 deletions blocks/contact-form/contact-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,9 @@ const addForm = async (block) => {
if (window.selectedListingId) {
const prop = findListing();
taEl.value = `Hi, I would like more information about ${prop.StreetName}, ${prop.City}, ${prop.StateOrProvince} ${prop.PostalCode}.`;
if (window.location.pathname.length === 1) {
block.querySelector('.disclaimer').remove();
}
}

block.style.display = displayValue;
Expand Down
4 changes: 2 additions & 2 deletions blocks/contact-form/forms/contact-property.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@
</div>
<span class="label">no</span>
</div>
<div class="disclaimer"></div>
</div>
<div class="disclaimer">By providing this information, you are giving permission to Berkshire Hathaway HomeServices, Constellation1, a division of Constellation Web Solutions, Inc., and the members of the Berkshire Hathaway HomeServices real estate network (1) to contact you in response to your specific question or message, and (2) to register you in our system in order to communicate with you about properties for sale or rent in locations of interest to you. For more about how we will use your contact information, review our Privacy Policy.</div>
<div id="captcha-20285" class="g-recaptcha contact-form-captcha">
</div>
<div class="cta">
<div class="button-container">
<button type="submit" class="primary submit" aria-label="Submit contact form">Send</button>
<button class="button cancel" aria-label="Close modal">Cancel</button>
<button class="button secondary cancel" aria-label="Close modal">Cancel</button>
</div>
</div>
</form>
Expand Down
4 changes: 3 additions & 1 deletion blocks/property-listing/property-listing.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { getMetadata, readBlockConfig } from '../../scripts/aem.js';
import { render as renderCards } from '../shared/property/cards.js';
import Search from '../../scripts/apis/creg/search/Search.js';
import { propertySearch } from '../../scripts/apis/creg/creg.js';
import { a, div, p, span } from '../../scripts/dom-helpers.js';
import {
a, div, p, span,
} from '../../scripts/dom-helpers.js';

export default async function decorate(block) {
// Find and process list type configurations.
Expand Down
1 change: 1 addition & 0 deletions blocks/property-search-results/property-search-results.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ async function doSearch(search, redraw = true) {
const controller = searchController;
propertySearch(search).then((results) => {
if (!controller.signal.aborted) {
window.propertyListings = results;
displayList(parent, results);
contentWrapper.querySelector('.search-results-disclaimer-wrapper').replaceChildren(
domEl('hr', { role: 'presentation', 'aria-hidden': true, tabindex: -1 }),
Expand Down

0 comments on commit 88b9948

Please sign in to comment.