diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ac76c6e..fc69efa7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +# v4.3.0 +## 12/14/2020 + +1. [](#new) + * Added a new ‘condition’ attribute for tab for logic to process if it should display or not +1. [](#improved) + * Added priority to form translations/config +1. [](#bugfix) + * Fix admin access check [#463](https://github.com/getgrav/grav-plugin-form/pull/463) + + # v4.2.0 ## 12/02/2020 diff --git a/blueprints.yaml b/blueprints.yaml index 45d30520..0be6e058 100644 --- a/blueprints.yaml +++ b/blueprints.yaml @@ -1,7 +1,7 @@ name: Form slug: form type: plugin -version: 4.2.0 +version: 4.3.0 testing: false description: Enables the forms handling icon: check-square diff --git a/templates/forms/default/form.html.twig b/templates/forms/default/form.html.twig index 31ad7ce3..2675b6c0 100644 --- a/templates/forms/default/form.html.twig +++ b/templates/forms/default/form.html.twig @@ -47,7 +47,7 @@ session_timeout: " ~ config.system.session.timeout ~ " }; window.GravForm.translations = Object.assign({}, window.GravForm.translations || {}, { PLUGIN_FORM: {} }); -", {'group': 'bottom', 'position': 'before'}) %} +", {'group': 'bottom', 'position': 'before', 'priority': 100}) %} {# Backwards Compatibility for block overrides #} {% set override_form_classes %} diff --git a/templates/forms/fields/section/section.html.twig b/templates/forms/fields/section/section.html.twig index 9cbe615f..d3e9fe05 100644 --- a/templates/forms/fields/section/section.html.twig +++ b/templates/forms/fields/section/section.html.twig @@ -1,5 +1,5 @@ {% extends "forms/field.html.twig" %} -{% set title_level = grav.user.access.admin.login ? 'h1' : field.title_level|default('h3') %} +{% set title_level = grav['admin'] is defined ? 'h1' : field.title_level|default('h3') %} {% block field %} {% if field.security is empty or authorize(array(field.security)) %} diff --git a/templates/forms/fields/tabs/tabs.html.twig b/templates/forms/fields/tabs/tabs.html.twig index 5756abd1..b85f2a16 100644 --- a/templates/forms/fields/tabs/tabs.html.twig +++ b/templates/forms/fields/tabs/tabs.html.twig @@ -43,7 +43,7 @@