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

Fix #453 section title level #459

Merged
merged 1 commit into from
Dec 3, 2020
Merged
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
5 changes: 3 additions & 2 deletions templates/forms/fields/section/section.html.twig
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{% extends "forms/field.html.twig" %}
{% set title_level = grav.user.access.admin.login ? 'h1' : field.title_level|default('h3') %}

{% block field %}
{% if field.security is empty or authorize(array(field.security)) %}
<div class="{{ field.classes }}">
{% if field.title or field.underline %}
<h1 class="{% if not field.underline %}no_underline{% endif %}">{{ field.title|t }}</h1>
<{{ title_level }} class="{% if not field.underline %}no_underline{% endif %}">{{ field.title|t }}</{{ title_level }}>
{% endif %}

{% if field.text %}
Expand All @@ -18,4 +19,4 @@
{% endif %}
</div>
{% endif %}
{% endblock %}
{% endblock %}