Skip to content

Commit

Permalink
Merge pull request #411 from comicrelief/410_tidyup_marketingpref_markup
Browse files Browse the repository at this point in the history
Tidyup Marketing prefs markup
  • Loading branch information
AndyEPhipps authored Jun 24, 2020
2 parents 5be32ce + 92ed8cc commit 51c3f3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/components/MarketingConsent/MarketingConsentCheckbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ class MarketingConsentCheckbox extends Component {
const item = this.props.itemData;
const bgStyle = 'form__field--background';
const checkbox = item.id;
const customMessage = typeof item.customMessage !== 'undefined' ? item.customMessage : '';
const customMessage = typeof item.customMessage !== 'undefined' ? item.customMessage : null;
return (
<div key={item.id} className="form__field--wrapper form__field-wrapper--checkbox form__field-wrapper--background">
<p className="form__fieldset--label" aria-label={`Can we contact you by ${item.text}`}>{item.text}</p>
<p>{customMessage}</p>
{ customMessage && <p>{customMessage}</p> }
<div id={`field-wrapper--${item.text}`} className="form__field--wrapper">
{
item.options.map(option => (
Expand Down
13 changes: 1 addition & 12 deletions src/components/MarketingConsent/__snapshots__/_story.storyshot
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ exports[`Stories Storyshots Marketing Consent MarketingConsent 1`] = `
>
Email
</p>
<p>

</p>

<div
className="form__field--wrapper"
id="field-wrapper--Email"
Expand Down Expand Up @@ -103,9 +101,6 @@ exports[`Stories Storyshots Marketing Consent MarketingConsent 1`] = `
className="form__fieldset--label"
>
Post
</p>
<p>

</p>
<div
className="form__field--wrapper"
Expand Down Expand Up @@ -167,9 +162,6 @@ exports[`Stories Storyshots Marketing Consent MarketingConsent 1`] = `
className="form__fieldset--label"
>
Phone
</p>
<p>

</p>
<div
className="form__field--wrapper"
Expand Down Expand Up @@ -231,9 +223,6 @@ exports[`Stories Storyshots Marketing Consent MarketingConsent 1`] = `
className="form__fieldset--label"
>
SMS
</p>
<p>

</p>
<div
className="form__field--wrapper"
Expand Down

0 comments on commit 51c3f3f

Please sign in to comment.