Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed typo in classes and outerclasses and added outerclasses to column and section fields #2424

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion themes/grav/templates/forms/field.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{% set isDisabledToggleable = toggleable and not toggleableChecked %}

{% block field %}
<div class="form-field grid{% if vertical %} vertical{% endif %}{% if toggleable %} form-field-toggleable{% endif %} {{ field.outerclasses }} {{ field.field_classes }}">
<div class="form-field grid{% if vertical %} vertical{% endif %}{% if toggleable %} form-field-toggleable{% endif %} {{ field.outerclasses }} {{ field.classes }}">
{% block contents %}
{% if show_label %}
<div class="form-label{% if not vertical %} block size-1-3{% endif %}">
Expand Down
2 changes: 1 addition & 1 deletion themes/grav/templates/forms/fields/column/column.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% block field %}
{% embed 'forms/default/fields.html.twig' with {name: name, fields: field.fields} %}
{% block outer_markup_field_open %}<div class="form-column block pure-u-1-{{ cols }}">{% endblock %}
{% block outer_markup_field_open %}<div class="form-column block pure-u-1-{{ cols }} {{ field.outerclasses }}">{% endblock %}
{% block outer_markup_field_close %}</div>{% endblock %}
{% endembed %}
{% endblock %}
12 changes: 8 additions & 4 deletions themes/grav/templates/forms/fields/section/section.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,27 @@

{% block field %}
{% if field.security is empty or authorize(array(field.security)) %}

{% if field.outerclasses %}
<div class="{{ field.outerclasses }}">
{% endif %}
{% if field.title or field.underline %}
<h1 class="{{ field.classes }} {{ field.underline ?: 'no_underline' }}">{{ field.title|t }}</h1>
{% endif %}

{% if field.text %}
<p>{{ field.text|t|markdown|raw }}</p>
{{ field.text|t|markdown|raw }}
{% endif %}

{% embed 'forms/default/fields.html.twig' with {name: field.name, fields: field.fields} %}
{% block outer_markup_field_open %}
<div class="form-section {{ field.field_classes }} {{ field.outer_classes }}">
<div class="form-section {{ field.classes }} {{ field.outerclasses }}">
{% endblock %}
{% block outer_markup_field_close %}
</div>
{% endblock %}
{% endembed %}

{% if field.outerclasses %}
</div>
{% endif %}
{% endif %}
{% endblock %}