mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-07 11:16:27 +02:00
Updates to add universal key to any field
This commit is contained in:
@@ -50,6 +50,9 @@
|
||||
{# required attribute structures #}
|
||||
name="{{ field_name }}"
|
||||
value="{{ value|join(', ') }}"
|
||||
{% if field.key %}
|
||||
data-key-observe="{{ (scope ~ field_name)|fieldName }}"
|
||||
{% endif %}
|
||||
{# input attribute structures #}
|
||||
{% block input_attributes %}
|
||||
{% if field.classes is defined %}class="{{ field.classes }}" {% endif %}
|
||||
|
||||
@@ -80,6 +80,12 @@
|
||||
include 'forms/fields/key/key.html.twig'
|
||||
with { field: child, value: key }
|
||||
%}
|
||||
{% elseif child.key == true %}
|
||||
{% include [
|
||||
"forms/fields/#{child.type}/#{child.type}.html.twig",
|
||||
'forms/fields/key/key.html.twig'
|
||||
] with { field: child, value: key }
|
||||
%}
|
||||
{% elseif child.type %}
|
||||
{% set originalValue = childValue %}
|
||||
{%
|
||||
@@ -136,6 +142,13 @@
|
||||
include 'forms/fields/key/key.html.twig'
|
||||
with { field: child, value: null }
|
||||
-%}
|
||||
{%- elseif child.key == true -%}
|
||||
{%-
|
||||
include [
|
||||
"forms/fields/#{child.type}/#{child.type}.html.twig",
|
||||
'forms/fields/key/key.html.twig'
|
||||
] with { field: child, value: null }
|
||||
-%}
|
||||
{%- elseif child.type -%}
|
||||
{%-
|
||||
include [
|
||||
|
||||
Reference in New Issue
Block a user