-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathform-field-location.html
41 lines (40 loc) · 1.55 KB
/
form-field-location.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{%- capture this_preview_id -%}{{ include.label | slugify }}-event-url-follow-button{%- endcapture -%}
<fieldset
class="
{% include patterns/form-field-auto-save-classes %}
group
location
{% if include.depends %}pat-depends{% endif %}"
{% if include.action %}
data-pat-inject="
url: {{ include.action }};
source: #{{this_preview_id}}::element;
target: #{{this_preview_id}}::element"
{% endif %}>
<legend>{% include patterns/form-field-label-conditional.html %}</legend>
{% if page.location %}
<input
name="location"
type="text"
value="{% if page.event_location %}{{ page.event_location }}{% else %}Head office, Amsterdam{% endif %}">
<iframe
id="{{ this_preview_id }}"
width="100%"
height="240"
src="https://maps.google.com/maps?q={% if page.event_location %}{{ page.event_location }}{% else %}Head office, Amsterdam{% endif %}&t=&z=13&ie=UTF8&iwloc=&output=embed"
frameborder="0"
scrolling="no"
marginheight="0"
marginwidth="0">
</iframe>
<button
class="small pat-button icon-cancel-circle"
type="submit"
formaction="{{ page.url }}">Remove map</button>
{% else %}
<input
name="location"
type="text"
value="{% if page.event_location %}{{ page.event_location }}{% else %}Amsterdam{% endif %}">
{% endif %}
</fieldset>