Sha256: fad426796a66d97d76ed5f3634c4f06a03a136802765d00a87a8e248975278b7

Contents?: true

Size: 1.71 KB

Versions: 16

Compression:

Stored size: 1.71 KB

Contents

{% if include.form %}
  {%- assign name = include.field[0] | append: ']' | prepend: '[' | prepend: include.form -%}
  {%- assign id = include.field[1].id | default: name | replace: '[', '_' | remove: ']' -%}
{% else %}
  {%- assign name = include.field[0] -%}
  {%- assign id = include.field[1].id | default: name %}
{% endif %}

{%- assign label = include.field[1].label[site.locale] -%}
{%- assign help = include.field[1].help[site.locale] -%}
{%- assign error = include.field[1].error[site.locale] -%}
{%- assign autocomplete = include.field[1].autocomplete -%}

<div class="form-group" data-controller="country" data-country-group="{{ include.field[1].group }}">
  <label for="{{ id }}">
    {{ label }}
    {% if include.field[1].required %}*{% endif %}
  </label>

  <input data-target="country.id" type="hidden" name="{{ name }}" id="{{ id }}" value="" />
  <input data-target="country.iso" type="hidden" name="{{ include.form }}_ignore_{{ include.field[0] }}_iso" value="" />

  <input
    data-target="country.name"
    {% if help %}
      aria-describedby="help-{{ id }}"
    {% endif %}
    {% if include.field[1].required %}
      required
    {% endif %}
    type="{{ include.field[1].type }}"
    {% if autocomplete %}
      autocomplete="{{ autocomplete }}"
    {% endif %}
    name="{{ include.form }}_ignore_{{ include.field[0] }}"
    id="{{ include.form }}_ignore_{{ include.field[0] }}"
    disabled
    list="list-{{ id }}"
    class="form-control" />

  {%- if error -%}
    <div class="invalid-feedback">{{ error }}</div>
  {%- endif -%}

  {%- if help -%}
    <small id="help-{{ id }}" class="form-text">
      {{ help }}
    </small>
  {%- endif -%}

  <datalist id="list-{{ id }}" data-target="country.list">
  </datalist>
</div>

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
editorial-autogestiva-jekyll-theme-0.5.0rc0 _includes/country.html
observatorio-jekyll-theme-0.1.7 _includes/country.html
editorial-autogestiva-jekyll-theme-0.4.2 _includes/country.html
editorial-autogestiva-jekyll-theme-0.4.1 _includes/country.html
editorial-autogestiva-jekyll-theme-0.4.0 _includes/country.html
editorial-autogestiva-jekyll-theme-0.3.5 _includes/country.html
observatorio-jekyll-theme-0.1.6 _includes/country.html
observatorio-jekyll-theme-0.1.5 _includes/country.html
observatorio-jekyll-theme-0.1.4 _includes/country.html
observatorio-jekyll-theme-0.1.3 _includes/country.html
observatorio-jekyll-theme-0.1.2 _includes/country.html
editorial-autogestiva-jekyll-theme-0.3.4 _includes/country.html
editorial-autogestiva-jekyll-theme-0.3.3 _includes/country.html
editorial-autogestiva-jekyll-theme-0.3.2 _includes/country.html
editorial-autogestiva-jekyll-theme-0.3.1 _includes/country.html
editorial-autogestiva-jekyll-theme-0.3.0 _includes/country.html