From 9be238c4cb3378f0fd01d7b60fc62e3811f4ed1f Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Wed, 25 Nov 2020 15:42:35 +0200 Subject: [PATCH] Fixed stringable objects breaking the inputs --- CHANGELOG.md | 5 +++-- themes/grav/templates/forms/field.html.twig | 3 ++- .../templates/forms/fields/colorpicker/colorpicker.html.twig | 3 ++- themes/grav/templates/forms/fields/cron/cron.html.twig | 3 ++- .../grav/templates/forms/fields/datetime/datetime.html.twig | 3 ++- themes/grav/templates/forms/fields/editor/editor.html.twig | 3 ++- .../templates/forms/fields/iconpicker/iconpicker.html.twig | 3 ++- .../forms/fields/selectunique/selectunique.html.twig | 5 +++-- themes/grav/templates/partials/blueprints.html.twig | 2 +- 9 files changed, 19 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 352f5ca4..a941bc82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,10 +19,11 @@ * Stop propagation of ACL add button in ACL picker [flex-objects#83](https://github.com/trilbymedia/grav-plugin-flex-objects/issues/83) * Fixed missing special groups `authors` and `defaults` for pages * Fixed Page Move action and selection highlight in Parents selector modal [flex-objects#80](https://github.com/trilbymedia/grav-plugin-flex-objects/issues/80) - * Fixed folder auto-naming in Add Module [#1937](https://github.com/getgrav/grav-plugin-admin/issues/1937) + * Fixed folder auto-naming in Add Module [#1937](https://github.com/getgrav/grav-plugin-admin/issues/1937) * Fixed remodal issue triggering close when selecting a dropdown item ending outside of scope [#1682](https://github.com/getgrav/grav-plugin-admin/issues/1682) - * Reworked how collapsed lists work so the tooltip is not cut off [#1928](https://github.com/getgrav/grav-plugin-admin/issues/1928) + * Reworked how collapsed lists work so the tooltip is not cut off [#1928](https://github.com/getgrav/grav-plugin-admin/issues/1928) * Fixed KeepAlive issue where too large of a session value would fire the keep alive immediately [#1860](https://github.com/getgrav/grav-plugin-admin/issues/1860) + * Fixed stringable objects breaking the inputs # v1.10.0-rc.17 ## 10/07/2020 diff --git a/themes/grav/templates/forms/field.html.twig b/themes/grav/templates/forms/field.html.twig index 4ad40fa2..0baf414c 100644 --- a/themes/grav/templates/forms/field.html.twig +++ b/themes/grav/templates/forms/field.html.twig @@ -70,10 +70,11 @@ {% block input %}
{% block prepend %}{% endblock prepend %} + {% set input_value = value is iterable ? value|join(',') : value|string %}
+ {% set input_value = value is iterable ? value|join(',') : value|string %} + {% set input_value = value is iterable ? value|join(',') : value|string %} +
{% endblock %} diff --git a/themes/grav/templates/forms/fields/datetime/datetime.html.twig b/themes/grav/templates/forms/fields/datetime/datetime.html.twig index c1e00229..531c4e38 100644 --- a/themes/grav/templates/forms/fields/datetime/datetime.html.twig +++ b/themes/grav/templates/forms/fields/datetime/datetime.html.twig @@ -8,9 +8,10 @@ {% block input %}
+ {% set input_value = value is iterable ? value|join(',') : value|string %}
+ {% set input_value = value is iterable ? value|join("\n") : value|string %} + >{{ input_value|e('html') }}
{% if field.resizer is not defined or field.resizer not in ['off', 'false', 0] %}
{% endif %} {% if field.description %} diff --git a/themes/grav/templates/forms/fields/iconpicker/iconpicker.html.twig b/themes/grav/templates/forms/fields/iconpicker/iconpicker.html.twig index 84cbe7f5..f47d3681 100644 --- a/themes/grav/templates/forms/fields/iconpicker/iconpicker.html.twig +++ b/themes/grav/templates/forms/fields/iconpicker/iconpicker.html.twig @@ -12,11 +12,12 @@ {% block input %}
+ {% set input_value = value is iterable ? value|join(',') : value|string %} + {% set input_value = value is iterable ? value|join(',') : value|string %}