Added field_classes: field option

This commit is contained in:
Andy Miller
2017-03-13 13:37:32 -06:00
parent c7378443ac
commit 3c267259e3
2 changed files with 3 additions and 3 deletions

View File

@@ -9,7 +9,7 @@
{% endif %}
{% block field %}
<div class="form-field grid{% if vertical %} vertical{% endif %}{% if field.toggleable %} form-field-toggleable{% endif %}">
<div class="form-field grid{% if vertical %} vertical{% endif %}{% if field.toggleable %} form-field-toggleable{% endif %} {{ field.field_classes }}">
{% block contents %}
<div class="form-label{% if not vertical %} block size-1-3{% endif %}">
{% if field.toggleable %}

View File

@@ -1,6 +1,6 @@
{% if field.security is empty or authorize(array(field.security)) %}
{% if field.title %}
{% if field.title or field.underline %}
<h1 {% if not field.underline %}class="no_underline"{% endif %}>{% if grav.twig.twig.filters['tu'] is defined %}{{ field.title|tu }}{% else %}{{ field.title|t }}{% endif %}</h1>
{% endif %}
@@ -9,7 +9,7 @@
{% endif %}
{% if field.fields %}
<div class="form-section">
<div class="form-section {{ field.field_classes }}">
{% for field in field.fields %}
{% if field.type %}
{% set value = data.value(field.name) %}