Cleaned up Sarahs code - Privacy Checkbox
This commit is contained in:
1 file changed
+69
-18
+69
-18
@@ -148,28 +148,54 @@
|
|||||||
{% when 'text' %}
|
{% when 'text' %}
|
||||||
<div class="rte">{{ block.settings.text }}</div>
|
<div class="rte">{{ block.settings.text }}</div>
|
||||||
|
|
||||||
|
{% when 'privacy_input' %}
|
||||||
|
<!-- PRIVACY CHECKBOX HIER -->
|
||||||
|
<div class="field field--checkbox lightly-spaced-row">
|
||||||
|
<label class="field__label" for="privacy">
|
||||||
|
<input
|
||||||
|
class="field__input"
|
||||||
|
type="checkbox"
|
||||||
|
id="privacy"
|
||||||
|
name="contact[privacy]"
|
||||||
|
required
|
||||||
|
value="yes"
|
||||||
|
>
|
||||||
|
* I agree to the <a href="/pages/privacy-policy" target="_blank">Privacy Policy</a>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="lightly-spaced-row">
|
||||||
|
<button type="submit">{{ 'contact.form.send' | t }}</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% when 'privacy_input' %}
|
||||||
|
{% if block.settings.title != blank %}
|
||||||
|
<!-- PRIVACY CHECKBOX HIER -->
|
||||||
|
<div class="field field--checkbox lightly-spaced-row">
|
||||||
|
{%- assign title_handle = block.settings.title | handle -%}
|
||||||
|
<label for="contact_{{ title_handle }}">{{ block.settings.title | escape }}</label>
|
||||||
|
<input
|
||||||
|
class="field__input"
|
||||||
|
type="checkbox"
|
||||||
|
id="privacy"
|
||||||
|
name="contact[privacy]"
|
||||||
|
required
|
||||||
|
value="yes"
|
||||||
|
>
|
||||||
|
<!--{{ block.settings.textin | escape }}-->
|
||||||
|
* I agree to the <a href="/pages/privacy-policy" target="_blank">Privacy Policy</a>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="lightly-spaced-row">
|
||||||
|
<button type="submit">{{ 'contact.form.send' | t }}</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% endcase %}
|
{% endcase %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<!-- PRIVACY CHECKBOX HIER -->
|
|
||||||
<div class="field field--checkbox lightly-spaced-row">
|
|
||||||
<label class="field__label" for="privacy">
|
|
||||||
<input
|
|
||||||
class="field__input"
|
|
||||||
type="checkbox"
|
|
||||||
id="privacy"
|
|
||||||
name="contact[privacy]"
|
|
||||||
required
|
|
||||||
value="yes"
|
|
||||||
>
|
|
||||||
* I agree to the <a href="/pages/privacy-policy" target="_blank">Privacy Policy</a>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="lightly-spaced-row">
|
|
||||||
<button type="submit">{{ 'contact.form.send' | t }}</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endform %}
|
{% endform %}
|
||||||
@@ -335,6 +361,31 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "privacy_input",
|
||||||
|
"name": "Privacy Checkbox",
|
||||||
|
"limit": 1,
|
||||||
|
"settings": [
|
||||||
|
{
|
||||||
|
"type": "text",
|
||||||
|
"id": "title",
|
||||||
|
"label": "Label",
|
||||||
|
"default": "Privacy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "text",
|
||||||
|
"id": "textin",
|
||||||
|
"label": "Label",
|
||||||
|
"default": "Privacy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "checkbox",
|
||||||
|
"id": "required",
|
||||||
|
"label": "Required",
|
||||||
|
"default": true
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "custom_input",
|
"type": "custom_input",
|
||||||
"name": "Custom input",
|
"name": "Custom input",
|
||||||
|
|||||||
Reference in new issue
Block a user