-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathform-field-url-preview.html
56 lines (50 loc) · 1.95 KB
/
form-field-url-preview.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{%- capture this_button_id -%}{{ include.label | slugify }}-event-url-follow-button{%- endcapture -%}
<fieldset
class="
{% include patterns/form-field-auto-save-classes %}
group
url
{{ include.class }}
{% if include.depends %}pat-depends{% endif %}"
{% if include.action %}
data-pat-inject="
url: {{ include.action }};
source: #{{this_button_id}}::element;
target: #{{this_button_id}}::element"
{% endif %}
{% if include.depends %}
data-pat-depends="
{{ include.depends }};
transition: slide"
{% endif %}>
<legend>
{% include patterns/i18n id=include.label %}{% include patterns/form-required.html %}
</legend>
<span
class="button-field type-url">
<input
{% if include.required == true %}required="required"{% endif %}
{% if include.state == 'disabled' %}disabled{% endif %}
{% if include.size %}size="{{ include.chars }}"{% endif %}
{% if include.placeholder %}placeholder="{{ site.data[ui_data_path].ui[include.placeholder][site.data.config.lang] }}"{% endif %}
{% if include.maxlength %}maxlength="{{ include.maxlength }}"{% endif %}
type="url"
class="{% if include.autofocus %}pat-autofocus{% endif %}"
name="{{ include.name }}"
value="{{ include.value }}"
/>
<a
class="follow"
target="_blank"
id="{{ this_button_id }}"
title="Visit this URL"
{% if page.event_url %}href="{{ page.event_url }}"{% endif %}>Follow</a>
</span>
{% include patterns/form-has-changes.html %}
{% if include.help %}
{% include patterns/form-help.html
content=include.help
more=include.help_more %}
{% endif %}
{% include patterns/form-message.html message=include.message %}
</fieldset>