Merge branch 'feature/1.7' of github.com:getgrav/grav-plugin-admin into feature/1.7

This commit is contained in:
Andy Miller
2018-02-05 13:09:48 -07:00
2 changed files with 32 additions and 14 deletions

View File

@@ -8,6 +8,7 @@
* Rolled back JS to known working versions [#1323](https://github.com/getgrav/grav-plugin-admin/issues/1323)
* Fixed missing translation in order field [#1324](https://github.com/getgrav/grav-plugin-admin/issues/1324)
* Fixed UI issue with last drop-down in button group [1325](https://github.com/getgrav/grav-plugin-admin/issues/1325)
* Fixed fieldset field outdated rendering [#1313](https://github.com/getgrav/grav-plugin-admin/issues/1313)
# v1.7.0-rc.2
## 01/24/2018

View File

@@ -54,21 +54,38 @@
{% endif %}
{% if field.fields %}
{%- for childName, child in field.fields -%}
{%- if childName starts with '.' -%}
{%- set childKey = childName|trim('.') -%}
{%- set childName = itemName ~ childName -%}
{%- else %}
{%- set childKey = childName -%}
{%- set childName = childName|replace({'*': key}) -%}
{%- endif %}
{%- set child = child|merge({ name: childName }) -%}
{% for childName, child in field.fields %}
{%- if childName == 'value' -%}
{% set childKey = '' %}
{% set childName = itemName -%}
{%- elseif childName starts with '.' -%}
{% set childKey = childName|trim('.') %}
{% set childName = itemName ~ childName %}
{% else %}
{% set childKey = childName %}
{% set childName = childName|replace({'*': key}) %}
{% endif %}
{% set child = child|merge({ name: childName }) %}
{% if field.type %}
{%- include [
"forms/fields/#{child.type}/#{child.type}.html.twig",
'forms/fields/text/text.html.twig'
] with { field: child, value: data.value(child.name) } -%}
{% if child.type == 'key' %}
{%
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 = data.value(child.name) %}
{%
include [
"forms/fields/#{child.type}/#{child.type}.html.twig",
'forms/fields/text/text.html.twig'
] with { field: child, value: data.value(child.name) }
%}
{% endif %}
{% endfor %}
{% endif %}