_includes/text.html in sutty-donaciones-jekyll-theme-0.1.1 vs _includes/text.html in sutty-donaciones-jekyll-theme-0.1.2
- old
+ new
@@ -1,31 +1,63 @@
\ No newline at end of file
+{%- assign name = include.field[0] -%}
+{%- assign id = include.field[1].id | default: name -%}
+{%- assign label = include.field[1].label[site.locale] -%}
+{%- assign help = include.field[1].help[site.locale] -%}
+{%- assign autocomplete = include.field[1].autocomplete -%}
+
+<div class="form-group">
+ <label for="{{ id }}">
+ {% if include.field[1].required %}*{% endif %}
+ {{ label }}
+ </label>
+
+ <textarea
+ {% if help %}
+ aria-describedby="help-{{ id }}"
+ {% endif %}
+ {% if include.field[1].required %}
+ required
+ {% endif %}
+ name="{{ name }}"
+ id="{{ id }}"
+ {% if autocomplete %}
+ autocomplete="{{ autocomplete }}"
+ {% endif %}
+ class="form-control"></textarea>
+
+ {%- if .help -%}
+ <small id="help-{{ id }}" class="form-text">
+ {{ help }}
+ </small>
+ {%- endif -%}
+</div>