Fix #859 make default value work for filepicker

This commit is contained in:
Flavio Copes
2016-11-11 18:53:55 +01:00
parent 8aa719f557
commit b2f88bba2e
2 changed files with 8 additions and 3 deletions

View File

@@ -13,6 +13,7 @@
* Use rawRoute for parent too when saving [#843](https://github.com/getgrav/grav-plugin-admin/issues/843)
* Avoid different output when users exist or not in password recovery [#849](https://github.com/getgrav/grav/issues/849)
* Fix login to admin with permission inherited from group [#857](https://github.com/getgrav/grav-plugin-admin/issues/857)
* Make default value work for filepicker [#859](https://github.com/getgrav/grav-plugin-admin/issues/859)
# v1.2.4
## 10/22/2016

View File

@@ -1,7 +1,11 @@
{% embed "forms/fields/select/select.html.twig" %}
{% if not field.options and value %}
{% set field = field|merge({options: {(value): value}}) %}
{% endif %}
{% block input %}
{% if not field.options and value %}
{% set field = field|merge({options: {(value): value}}) %}
{% endif %}
{{ parent() }}
{% endblock %}
{% block global_attributes %}
data-grav-filepicker