_includes/contact.html in editorial-autogestiva-jekyll-theme-0.2.6 vs _includes/contact.html in editorial-autogestiva-jekyll-theme-0.2.7

- old
+ new

@@ -1,34 +1,21 @@ -<form method="post" action="https://api.sutty.nl/v1/sites/{{ site.hostname }}/contact"> - <input - type="hidden" - name="redirect" - value="{{ site.url }}/{{ include.url }}?{{ site.i18n.contact.thanks }}" /> +{% comment %} + Esta imagen obtiene una cookie desde la API de Sutty para autorizar el + envío del formulario. +{% endcomment %} +<img class="d-none" src="https://api.sutty.nl/v1/sites/{{ site.hostname }}/contact/cookie.png" /> - {%- for field in site.i18n.contact.form.fields -%} - <div class="form-group"> - <label for="pronouns">{{ field.label }}</label> - <input - type="{{ field.type }}" - id="{{ field.name }}" - name="{{ field.name }}" - value="" - class="form-control" - autocomplete="{{ field.autocomplete }}" - placeholder="{{ field.placeholder }}" /> +{% comment %} + El formulario se envía a la API. La definición del formulario se + encuentra en _data/forms/contacto.yml +{% endcomment %} +<form action="https://api.sutty.nl/v1/sites/{{ site.hostname }}/contact/contacto" + method="post"> + {%- for field in include.form -%} + {% assign template = field[1].type | append: '.html' %} + <div class="col{{ field[1].col | default: 12 | prepend: '-' }}"> + {% include {{ template }} field=field %} </div> {%- endfor -%} - <div class="form-group"> - <label for="body">{{ site.i18n.contact.form.body }}</label> - <textarea name="body" id="body" required class="form-control"></textarea> - </div> - - <input type="submit" class="btn btn-success" value="{{ site.i18n.contact.form.submit }}" /> - - <div class="form-check form-check-inline"> - <input type="checkbox" name="gdpr" id="gdpr" value="1" required class="form-check-input" /> - <label class="form-check-label" for="gdpr"> - {{ site.i18n.contact.form.gdpr }} - </label> - </div> + <input type="hidden" name="redirect" value="{{ site.url }}{{ include.url }}" /> </form>