imagen, archivo, teléfono
This commit is contained in:
parent
316041fe91
commit
9fee387183
5 changed files with 40 additions and 3 deletions
|
@ -2,7 +2,9 @@
|
|||
{%- assign id = include.field[1].id | default: name -%}
|
||||
{%- assign label = include.field[1]['path'].label[site.locale] -%}
|
||||
{%- assign help = include.field[1]['path'].help[site.locale] -%}
|
||||
{%- assign autocomplete = include.field[1].autocomplete -%}
|
||||
{%- assign accept = include.field[1].accept -%}
|
||||
|
||||
<label>{{ label }}</label>
|
||||
|
||||
<div class="custom-file">
|
||||
<input
|
||||
|
@ -15,8 +17,8 @@
|
|||
type="{{ include.field[1].type }}"
|
||||
name="{{ name }}[path]"
|
||||
id="{{ id }}_path"
|
||||
{% if autocomplete %}
|
||||
autocomplete="{{ autocomplete }}"
|
||||
{% if accept %}
|
||||
accept="{{ accept }}"
|
||||
{% endif %}
|
||||
class="custom-file-input" />
|
||||
|
||||
|
|
1
_includes/form/image.html
Symbolic link
1
_includes/form/image.html
Symbolic link
|
@ -0,0 +1 @@
|
|||
../image.html
|
1
_includes/form/tel.html
Symbolic link
1
_includes/form/tel.html
Symbolic link
|
@ -0,0 +1 @@
|
|||
../tel.html
|
32
_includes/image.html
Normal file
32
_includes/image.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
{%- assign name = include.field[0] -%}
|
||||
{%- assign id = include.field[1].id | default: name -%}
|
||||
{%- assign label = include.field[1]['path'].label[site.locale] -%}
|
||||
{%- assign help = include.field[1]['path'].help[site.locale] -%}
|
||||
|
||||
<label>{{ label }}</label>
|
||||
|
||||
<div class="custom-file">
|
||||
<input
|
||||
{% if help %}
|
||||
aria-describedby="help-{{ id }}"
|
||||
{% endif %}
|
||||
{% if include.field[1].required %}
|
||||
required
|
||||
{% endif %}
|
||||
type="{{ include.field[1].type }}"
|
||||
name="{{ name }}[path]"
|
||||
id="{{ id }}_path"
|
||||
accept="image/*"
|
||||
class="custom-file-input" />
|
||||
|
||||
<label for="{{ id }}_path" class="custom-file-label">
|
||||
{{ label }}
|
||||
{% if include.field[1].required %}*{% endif %}
|
||||
</label>
|
||||
|
||||
{%- if help -%}
|
||||
<small id="help-{{ id }}" class="form-text">
|
||||
{{ help }}
|
||||
</small>
|
||||
{%- endif -%}
|
||||
</div>
|
1
_includes/tel.html
Normal file
1
_includes/tel.html
Normal file
|
@ -0,0 +1 @@
|
|||
{% include input.html field=field %}
|
Loading…
Reference in a new issue