This commit is contained in:
codecalm
2020-02-23 17:07:06 +01:00
parent 43e8415114
commit ad8a8b378b
3 changed files with 38 additions and 5 deletions
+3 -2
View File
@@ -1,8 +1,9 @@
{% assign key = include.key | default: 'people' %}
{% assign id = include.select-id | default: key %}
{% assign data = site.data.selects[key] %}
{% assign options = data.options %}
<select name="{{ key }}" id="select-{{ key }}" class="form-select"{% if data.multiple %} multiple{% endif %}>
<select name="{{ key }}" id="select-{{ id }}" class="form-select{% if include.state %} is-{{ include.state }}{% endif %}"{% if data.multiple %} multiple{% endif %}>
{% if options == 'people' %}
{% for person in site.data.people limit: 20 %}
{% capture avatar %}
@@ -32,7 +33,7 @@
{% capture_global scripts %}
<script>
$(document).ready(function () {
$('#select-{{ key }}').selectize({
$('#select-{{ id }}').selectize({
{% if key == "countries" %}
render: {
option: function (data, escape) {