1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-25 11:29:57 +04:00
Files
tabler/pages/_includes/ui/form/input-group.html
2020-01-26 12:21:02 +01:00

47 lines
1.7 KiB
HTML

<div class="input-group{% if include.class %} {{ include.class }}{% endif %}">
{% if include.prepend %}
<div class="input-group-prepend">
<span class="input-group-text">
{% if include.prepend == "checkbox" or include.prepend == "radio" %}
<input class="form-check-input m-0" type="{{ include.prepend }}" checked>
{% else %}
{{ include.prepend }}
{% endif %}
</span>
</div>
{% endif %}
<input type="{{ include.type | default: 'text' }}" class="form-control{% if include.input-class %} {{ include.input-class }}{% endif %}" {% if include.placeholder %} placeholder="{{ include.placeholder }}" {% endif %}{% if include.value %} value="{{ include.value }}"{% endif %}>
{% if include.append %}
<div class="input-group-append">
<span class="input-group-text">
{% if include.append == "checkbox" or include.append == "radio" %}
<input class="form-check-input m-0" type="{{ include.append }}" checked>
{% else %}
{{ include.append }}
{% endif %}
</span>
</div>
{% endif %}
{% if include.append-link %}
<div class="input-group-append">
<span class="input-group-text">
<a href="#" class="input-group-link">{{ include.append-link }}</a>
</span>
</div>
{% endif %}
{% if include.append-button %}
{% assign buttons = include.append-button | split: ',' %}
<div class="input-group-append">
<span class="input-group-text">
{% for button in buttons %}
{% assign b = button | split: ':' %}
{% assign icon = b[0] %}
{% assign description = b[1] %}
<a href="#" class="link-secondary{% unless forloop.first %} ml-2{% endunless %}{% if forloop.index == 3 %} disabled{% endif %}" title="{{ description }}" data-toggle="tooltip">{% include ui/icon.html icon=icon %}</a>
{% endfor %}
</span>
</div>
{% endif %}
</div>