Skip to content

Commit

Permalink
Merge branch 'release/4.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Dec 15, 2020
2 parents 714b03f + 79ae3bf commit 5bcd0cb
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion templates/forms/default/form.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down
2 changes: 1 addition & 1 deletion templates/forms/fields/section/section.html.twig
Original file line number Diff line number Diff line change
@@ -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)) %}
Expand Down
2 changes: 1 addition & 1 deletion templates/forms/fields/tabs/tabs.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

<div class="tabs-nav">
{% for tab in tabs %}
{% if tab.type == 'tab' %}
{% if tab.type == 'tab' and (tab.condition is null or tab.condition == true) %}
<a class="tab__link {{ (storedTab == scope ~ tab.name) or active == loop.index ? 'active' : '' }}" data-tabid="tab-{{ tabsKey ~ loop.index }}" data-tabkey="tab-{{ tabsKey }}" data-scope="{{ scope ~ tab.name }}">
<span>{{ tab.title|t }}</span>
{% endif %}
Expand Down

0 comments on commit 5bcd0cb

Please sign in to comment.