mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-02-16 11:37:47 +01:00
Fixed stringable objects breaking the inputs
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -70,10 +70,11 @@
|
||||
{% block input %}
|
||||
<div class="form-input-wrapper {{ field.size }} {{ field.wrapper_classes }}">
|
||||
{% block prepend %}{% endblock prepend %}
|
||||
{% set input_value = value is iterable ? value|join(',') : value|string %}
|
||||
<input
|
||||
{# required attribute structures #}
|
||||
name="{{ field_name }}"
|
||||
value="{{ value|join(',') }}"
|
||||
value="{{ input_value }}"
|
||||
{% if field.key %}
|
||||
data-key-observe="{{ (scope ~ field_name)|fieldName }}"
|
||||
{% endif %}
|
||||
|
||||
@@ -6,11 +6,12 @@
|
||||
{% block input %}
|
||||
<div class="form-list-wrapper {{ field.size }}" data-type="collection">
|
||||
<div class="g-colorpicker">
|
||||
{% set input_value = value is iterable ? value|join(',') : value|string %}
|
||||
<input
|
||||
data-grav-colorpicker="{{ {update: '.g-colorpicker-preview-wrap .g-colorpicker-preview'}|json_encode|e('html_attr') }}"
|
||||
{# required attribute structures #}
|
||||
name="{{ (scope ~ field.name)|fieldName }}"
|
||||
value="{{ value|raw|join(', ') }}"
|
||||
value="{{ input_value }}"
|
||||
type="text"
|
||||
{# input attribute structures #}
|
||||
{% block input_attributes %}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{% extends "forms/field.html.twig" %}
|
||||
|
||||
{% block input %}
|
||||
<input type="hidden" class="input" name="{{ (scope ~ field.name)|fieldName }}" value="{{ value|join(', ') }}" />
|
||||
{% set input_value = value is iterable ? value|join(',') : value|string %}
|
||||
<input type="hidden" class="input" name="{{ (scope ~ field.name)|fieldName }}" value="{{ input_value }}" />
|
||||
<div class="cron-selector"></div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -8,9 +8,10 @@
|
||||
|
||||
{% block input %}
|
||||
<div class="form-input-wrapper datetime-picker-wrapper {{ field.size }}">
|
||||
{% set input_value = value is iterable ? value|join(',') : value|string %}
|
||||
<input
|
||||
name="{{ (scope ~ field.name)|fieldName }}"
|
||||
value="{{ value|raw|join(', ') }}"
|
||||
value="{{ input_value }}"
|
||||
{% block input_attributes %}
|
||||
type="text"
|
||||
data-grav-datetime="{{ {'format': js_dateformat} | json_encode | e('html_attr') }}"
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
<div class="form-field {{ field.classes|default('') }}">
|
||||
<div class="form-data grav-editor">
|
||||
<div class="grav-editor-content is-active fontsize-{{ codemirrorOptions.font_size|default(fontsize) }} fontfamily-{{ codemirrorOptions.font }}">
|
||||
{% set input_value = value is iterable ? value|join("\n") : value|string %}
|
||||
<textarea
|
||||
data-grav-editor="{{ {'codemirror': codemirrorOptions} | json_encode|e('html_attr') }}"
|
||||
data-grav-editor-mode="editor"
|
||||
@@ -42,7 +43,7 @@
|
||||
{% if field.readonly in ['on', 'true', 1] %}readonly="readonly"{% endif %}
|
||||
{% if field.validate.required in ['on', 'true', 1] %}required="required"{% endif %}
|
||||
{% if 'preview' not in codemirrorOptions.ignore %}data-grav-urlpreview="{{ base_url }}/media/{{ admin.route|trim('/') }}.json"{% endif %}
|
||||
>{{ value|join("\n")|e('html') }}</textarea>
|
||||
>{{ input_value|e('html') }}</textarea>
|
||||
</div>
|
||||
{% if field.resizer is not defined or field.resizer not in ['off', 'false', 0] %}<div class="grav-editor-resizer"></div>{% endif %}
|
||||
{% if field.description %}
|
||||
|
||||
@@ -12,11 +12,12 @@
|
||||
{% block input %}
|
||||
<div class="form-list-wrapper {{ field.size }}" data-type="collection">
|
||||
<div class="icon-picker" data-pickerid="fa" data-iconsets='{"fa":"FontAwesome Icons"}'>
|
||||
{% set input_value = value is iterable ? value|join(',') : value|string %}
|
||||
<input
|
||||
{# required attribute structures #}
|
||||
name="{{ (scope ~ field.name)|fieldName }}"
|
||||
data-format="{{ field.format == 'short' ? 'short' : 'long' }}"
|
||||
value="{{ value|raw|join(', ') }}"
|
||||
value="{{ input_value }}"
|
||||
type="text"
|
||||
{# input attribute structures #}
|
||||
{% block input_attributes %}
|
||||
|
||||
@@ -8,8 +8,9 @@
|
||||
|
||||
{% block input %}
|
||||
<div class="form-input-wrapper {{ field.size }}">
|
||||
{% set input_value = value is iterable ? value|join(',') : value|string %}
|
||||
<select
|
||||
value="{{ value|raw|join(', ') }}"
|
||||
value="{{ input_value }}"
|
||||
name="{{ (scope ~ field.name)|fieldName }}"
|
||||
data-select-observe
|
||||
{% block input_attributes %}
|
||||
@@ -39,4 +40,4 @@
|
||||
<div><p class="notice warning">It is advised not to use a <strong>default</strong> option with the selectunique field. Currently default value set to `{{ field.default }}`</p></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
{% for name, value in data.extra %}
|
||||
{% if name not in ['_json','task','admin-nonce'] %}
|
||||
{% set field = {name: '_json.' ~ name} %}
|
||||
{% set value = value|raw|json_encode %}
|
||||
{% set value = value|json_encode %}
|
||||
{% include 'forms/fields/hidden/hidden.html.twig' %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user