diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6c9e75b3..532c4559 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,18 @@
+# v1.10.19
+## 08/31/2021
+
+1. [](#new)
+ * Require **Grav 1.7.19** and **Form 5.1.0** and **Login 3.5.0**
+ * Updated SCSS compiler to v1.6
+2. [](#improved)
+ * Updated forms and nested fields to use new form logic
+ * Admin form now use layout `admin`, meaning you can create admin specific field templates by `forms/fields/myfield/admin-field.html.twig`
+ * Stop using `|tu` filter, Grav already has the same logic in `|t` for admin
+ * Remove unneeded escapes
+ * Allow removal of plugin when disabled [#2167](https://github.com/getgrav/grav-plugin-admin/issues/2167)
+3. [](#bugfix)
+ * Fixed missing values in `fieldset` form field
+
# v1.10.18
## 07/19/2021
diff --git a/blueprints.yaml b/blueprints.yaml
index 42d3fbd5..5020bc61 100644
--- a/blueprints.yaml
+++ b/blueprints.yaml
@@ -1,7 +1,7 @@
name: Admin Panel
slug: admin
type: plugin
-version: 1.10.18
+version: 1.10.19
description: Adds an advanced administration panel to manage your site
icon: empire
author:
@@ -15,11 +15,11 @@ docs: https://github.com/getgrav/grav-plugin-admin/blob/develop/README.md
license: MIT
dependencies:
- - { name: grav, version: '>=1.7.10' }
- - { name: form, version: '>=4.1.0' }
- - { name: login, version: '>=3.3.5' }
- - { name: email, version: '>=3.0.9' }
- - { name: flex-objects, version: '>=1.0.0' }
+ - { name: grav, version: '>=1.7.19' }
+ - { name: form, version: '>=5.1.0' }
+ - { name: login, version: '>=3.5.0' }
+ - { name: email, version: '>=3.1.0' }
+ - { name: flex-objects, version: '>=1.1.0' }
form:
validation: loose
diff --git a/classes/plugin/Controllers/Login/LoginController.php b/classes/plugin/Controllers/Login/LoginController.php
index 4baf402b..1e3c81f0 100644
--- a/classes/plugin/Controllers/Login/LoginController.php
+++ b/classes/plugin/Controllers/Login/LoginController.php
@@ -140,7 +140,7 @@ class LoginController extends AdminController
}
$post = $this->getPost();
- $credentials = $post['data'] ?? [];
+ $credentials = (array)($post['data'] ?? []);
$login = $this->getLogin();
$config = $this->getConfig();
diff --git a/composer.lock b/composer.lock
index a046854e..9d4e3e9d 100644
--- a/composer.lock
+++ b/composer.lock
@@ -66,16 +66,16 @@
},
{
"name": "laminas/laminas-zendframework-bridge",
- "version": "1.2.0",
+ "version": "1.3.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-zendframework-bridge.git",
- "reference": "6cccbddfcfc742eb02158d6137ca5687d92cee32"
+ "reference": "13af2502d9bb6f7d33be2de4b51fb68c6cdb476e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/6cccbddfcfc742eb02158d6137ca5687d92cee32",
- "reference": "6cccbddfcfc742eb02158d6137ca5687d92cee32",
+ "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/13af2502d9bb6f7d33be2de4b51fb68c6cdb476e",
+ "reference": "13af2502d9bb6f7d33be2de4b51fb68c6cdb476e",
"shasum": ""
},
"require": {
@@ -124,7 +124,7 @@
"type": "community_bridge"
}
],
- "time": "2021-02-25T21:54:58+00:00"
+ "time": "2021-06-24T12:49:22+00:00"
},
{
"name": "p3k/picofeed",
@@ -188,16 +188,16 @@
},
{
"name": "scssphp/scssphp",
- "version": "v1.5.2",
+ "version": "v1.6.0",
"source": {
"type": "git",
"url": "https://github.com/scssphp/scssphp.git",
- "reference": "6fe16f169f55f5e793474fb210aac0a4481619e5"
+ "reference": "b83594e2323c5d6e80785df3f91b9d1d32aad530"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/scssphp/scssphp/zipball/6fe16f169f55f5e793474fb210aac0a4481619e5",
- "reference": "6fe16f169f55f5e793474fb210aac0a4481619e5",
+ "url": "https://api.github.com/repos/scssphp/scssphp/zipball/b83594e2323c5d6e80785df3f91b9d1d32aad530",
+ "reference": "b83594e2323c5d6e80785df3f91b9d1d32aad530",
"shasum": ""
},
"require": {
@@ -255,9 +255,9 @@
],
"support": {
"issues": "https://github.com/scssphp/scssphp/issues",
- "source": "https://github.com/scssphp/scssphp/tree/v1.5.2"
+ "source": "https://github.com/scssphp/scssphp/tree/v1.6.0"
},
- "time": "2021-05-18T00:05:58+00:00"
+ "time": "2021-07-02T16:28:10+00:00"
}
],
"packages-dev": [
@@ -1355,16 +1355,16 @@
},
{
"name": "phpunit/php-file-iterator",
- "version": "2.0.3",
+ "version": "2.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357"
+ "reference": "28af674ff175d0768a5a978e6de83f697d4a7f05"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/4b49fb70f067272b659ef0174ff9ca40fdaa6357",
- "reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/28af674ff175d0768a5a978e6de83f697d4a7f05",
+ "reference": "28af674ff175d0768a5a978e6de83f697d4a7f05",
"shasum": ""
},
"require": {
@@ -1403,7 +1403,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
- "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.3"
+ "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.4"
},
"funding": [
{
@@ -1411,7 +1411,7 @@
"type": "github"
}
],
- "time": "2020-11-30T08:25:21+00:00"
+ "time": "2021-07-19T06:46:01+00:00"
},
{
"name": "phpunit/php-text-template",
@@ -1519,16 +1519,16 @@
},
{
"name": "phpunit/php-token-stream",
- "version": "3.1.2",
+ "version": "3.1.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "472b687829041c24b25f475e14c2f38a09edf1c2"
+ "reference": "9c1da83261628cb24b6a6df371b6e312b3954768"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/472b687829041c24b25f475e14c2f38a09edf1c2",
- "reference": "472b687829041c24b25f475e14c2f38a09edf1c2",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/9c1da83261628cb24b6a6df371b6e312b3954768",
+ "reference": "9c1da83261628cb24b6a6df371b6e312b3954768",
"shasum": ""
},
"require": {
@@ -1566,7 +1566,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-token-stream/issues",
- "source": "https://github.com/sebastianbergmann/php-token-stream/tree/3.1.2"
+ "source": "https://github.com/sebastianbergmann/php-token-stream/tree/3.1.3"
},
"funding": [
{
@@ -1575,7 +1575,7 @@
}
],
"abandoned": true,
- "time": "2020-11-30T08:38:46+00:00"
+ "time": "2021-07-26T12:15:06+00:00"
},
{
"name": "phpunit/phpunit",
@@ -2425,6 +2425,7 @@
"type": "github"
}
],
+ "abandoned": true,
"time": "2020-11-30T07:30:19+00:00"
},
{
@@ -2476,21 +2477,22 @@
},
{
"name": "symfony/browser-kit",
- "version": "v4.4.25",
+ "version": "v4.4.27",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
- "reference": "729b1f0eca3ef18ea4e1a29b166145aff75d8fa1"
+ "reference": "9629d1524d8ced5a4ec3e94abdbd638b4ec8319b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/browser-kit/zipball/729b1f0eca3ef18ea4e1a29b166145aff75d8fa1",
- "reference": "729b1f0eca3ef18ea4e1a29b166145aff75d8fa1",
+ "url": "https://api.github.com/repos/symfony/browser-kit/zipball/9629d1524d8ced5a4ec3e94abdbd638b4ec8319b",
+ "reference": "9629d1524d8ced5a4ec3e94abdbd638b4ec8319b",
"shasum": ""
},
"require": {
"php": ">=7.1.3",
- "symfony/dom-crawler": "^3.4|^4.0|^5.0"
+ "symfony/dom-crawler": "^3.4|^4.0|^5.0",
+ "symfony/polyfill-php80": "^1.16"
},
"require-dev": {
"symfony/css-selector": "^3.4|^4.0|^5.0",
@@ -2527,7 +2529,7 @@
"description": "Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/browser-kit/tree/v4.4.25"
+ "source": "https://github.com/symfony/browser-kit/tree/v4.4.27"
},
"funding": [
{
@@ -2543,40 +2545,41 @@
"type": "tidelift"
}
],
- "time": "2021-05-26T17:39:37+00:00"
+ "time": "2021-07-21T12:19:41+00:00"
},
{
"name": "symfony/console",
- "version": "v4.4.25",
+ "version": "v4.4.29",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "a62acecdf5b50e314a4f305cd01b5282126f3095"
+ "reference": "8baf0bbcfddfde7d7225ae8e04705cfd1081cd7b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/a62acecdf5b50e314a4f305cd01b5282126f3095",
- "reference": "a62acecdf5b50e314a4f305cd01b5282126f3095",
+ "url": "https://api.github.com/repos/symfony/console/zipball/8baf0bbcfddfde7d7225ae8e04705cfd1081cd7b",
+ "reference": "8baf0bbcfddfde7d7225ae8e04705cfd1081cd7b",
"shasum": ""
},
"require": {
"php": ">=7.1.3",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php73": "^1.8",
- "symfony/polyfill-php80": "^1.15",
+ "symfony/polyfill-php80": "^1.16",
"symfony/service-contracts": "^1.1|^2"
},
"conflict": {
+ "psr/log": ">=3",
"symfony/dependency-injection": "<3.4",
"symfony/event-dispatcher": "<4.3|>=5",
"symfony/lock": "<4.4",
"symfony/process": "<3.3"
},
"provide": {
- "psr/log-implementation": "1.0"
+ "psr/log-implementation": "1.0|2.0"
},
"require-dev": {
- "psr/log": "~1.0",
+ "psr/log": "^1|^2",
"symfony/config": "^3.4|^4.0|^5.0",
"symfony/dependency-injection": "^3.4|^4.0|^5.0",
"symfony/event-dispatcher": "^4.3",
@@ -2616,7 +2619,7 @@
"description": "Eases the creation of beautiful and testable command line interfaces",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/console/tree/v4.4.25"
+ "source": "https://github.com/symfony/console/tree/v4.4.29"
},
"funding": [
{
@@ -2632,24 +2635,25 @@
"type": "tidelift"
}
],
- "time": "2021-05-26T11:20:16+00:00"
+ "time": "2021-07-27T19:04:53+00:00"
},
{
"name": "symfony/css-selector",
- "version": "v4.4.25",
+ "version": "v4.4.27",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
- "reference": "c1e29de6dc893b130b45d20d8051efbb040560a9"
+ "reference": "5194f18bd80d106f11efa8f7cd0fbdcc3af96ce6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/css-selector/zipball/c1e29de6dc893b130b45d20d8051efbb040560a9",
- "reference": "c1e29de6dc893b130b45d20d8051efbb040560a9",
+ "url": "https://api.github.com/repos/symfony/css-selector/zipball/5194f18bd80d106f11efa8f7cd0fbdcc3af96ce6",
+ "reference": "5194f18bd80d106f11efa8f7cd0fbdcc3af96ce6",
"shasum": ""
},
"require": {
- "php": ">=7.1.3"
+ "php": ">=7.1.3",
+ "symfony/polyfill-php80": "^1.16"
},
"type": "library",
"autoload": {
@@ -2681,7 +2685,7 @@
"description": "Converts CSS selectors to XPath expressions",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/css-selector/tree/v4.4.25"
+ "source": "https://github.com/symfony/css-selector/tree/v4.4.27"
},
"funding": [
{
@@ -2697,26 +2701,27 @@
"type": "tidelift"
}
],
- "time": "2021-05-26T17:39:37+00:00"
+ "time": "2021-07-21T12:19:41+00:00"
},
{
"name": "symfony/dom-crawler",
- "version": "v4.4.25",
+ "version": "v4.4.27",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
- "reference": "41d15bb6d6b95d2be763c514bb2494215d9c5eef"
+ "reference": "86aa075c9e0b13ac7db8d73d1f9d8b656143881a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/41d15bb6d6b95d2be763c514bb2494215d9c5eef",
- "reference": "41d15bb6d6b95d2be763c514bb2494215d9c5eef",
+ "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/86aa075c9e0b13ac7db8d73d1f9d8b656143881a",
+ "reference": "86aa075c9e0b13ac7db8d73d1f9d8b656143881a",
"shasum": ""
},
"require": {
"php": ">=7.1.3",
"symfony/polyfill-ctype": "~1.8",
- "symfony/polyfill-mbstring": "~1.0"
+ "symfony/polyfill-mbstring": "~1.0",
+ "symfony/polyfill-php80": "^1.16"
},
"conflict": {
"masterminds/html5": "<2.6"
@@ -2754,7 +2759,7 @@
"description": "Eases DOM navigation for HTML and XML documents",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/dom-crawler/tree/v4.4.25"
+ "source": "https://github.com/symfony/dom-crawler/tree/v4.4.27"
},
"funding": [
{
@@ -2770,25 +2775,26 @@
"type": "tidelift"
}
],
- "time": "2021-05-26T11:20:16+00:00"
+ "time": "2021-07-23T15:41:52+00:00"
},
{
"name": "symfony/event-dispatcher",
- "version": "v4.4.25",
+ "version": "v4.4.27",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "047773e7016e4fd45102cedf4bd2558ae0d0c32f"
+ "reference": "958a128b184fcf0ba45ec90c0e88554c9327c2e9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/047773e7016e4fd45102cedf4bd2558ae0d0c32f",
- "reference": "047773e7016e4fd45102cedf4bd2558ae0d0c32f",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/958a128b184fcf0ba45ec90c0e88554c9327c2e9",
+ "reference": "958a128b184fcf0ba45ec90c0e88554c9327c2e9",
"shasum": ""
},
"require": {
"php": ">=7.1.3",
- "symfony/event-dispatcher-contracts": "^1.1"
+ "symfony/event-dispatcher-contracts": "^1.1",
+ "symfony/polyfill-php80": "^1.16"
},
"conflict": {
"symfony/dependency-injection": "<3.4"
@@ -2798,7 +2804,7 @@
"symfony/event-dispatcher-implementation": "1.1"
},
"require-dev": {
- "psr/log": "~1.0",
+ "psr/log": "^1|^2|^3",
"symfony/config": "^3.4|^4.0|^5.0",
"symfony/dependency-injection": "^3.4|^4.0|^5.0",
"symfony/error-handler": "~3.4|~4.4",
@@ -2837,7 +2843,7 @@
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.25"
+ "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.27"
},
"funding": [
{
@@ -2853,7 +2859,7 @@
"type": "tidelift"
}
],
- "time": "2021-05-26T17:39:37+00:00"
+ "time": "2021-07-23T15:41:52+00:00"
},
{
"name": "symfony/event-dispatcher-contracts",
@@ -2936,20 +2942,21 @@
},
{
"name": "symfony/finder",
- "version": "v4.4.25",
+ "version": "v4.4.27",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "ed33314396d968a8936c95f5bd1b88bd3b3e94a3"
+ "reference": "42414d7ac96fc2880a783b872185789dea0d4262"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/ed33314396d968a8936c95f5bd1b88bd3b3e94a3",
- "reference": "ed33314396d968a8936c95f5bd1b88bd3b3e94a3",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/42414d7ac96fc2880a783b872185789dea0d4262",
+ "reference": "42414d7ac96fc2880a783b872185789dea0d4262",
"shasum": ""
},
"require": {
- "php": ">=7.1.3"
+ "php": ">=7.1.3",
+ "symfony/polyfill-php80": "^1.16"
},
"type": "library",
"autoload": {
@@ -2977,7 +2984,7 @@
"description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/finder/tree/v4.4.25"
+ "source": "https://github.com/symfony/finder/tree/v4.4.27"
},
"funding": [
{
@@ -2993,7 +3000,7 @@
"type": "tidelift"
}
],
- "time": "2021-05-26T11:20:16+00:00"
+ "time": "2021-07-23T15:41:52+00:00"
},
{
"name": "symfony/polyfill-ctype",
@@ -3247,16 +3254,16 @@
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.23.0",
+ "version": "v1.23.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1"
+ "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2df51500adbaebdc4c38dea4c89a2e131c45c8a1",
- "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6",
+ "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6",
"shasum": ""
},
"require": {
@@ -3307,7 +3314,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1"
},
"funding": [
{
@@ -3323,20 +3330,20 @@
"type": "tidelift"
}
],
- "time": "2021-05-27T09:27:20+00:00"
+ "time": "2021-05-27T12:26:48+00:00"
},
{
"name": "symfony/polyfill-php80",
- "version": "v1.23.0",
+ "version": "v1.23.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
- "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0"
+ "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/eca0bf41ed421bed1b57c4958bab16aa86b757d0",
- "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be",
+ "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be",
"shasum": ""
},
"require": {
@@ -3390,7 +3397,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.0"
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1"
},
"funding": [
{
@@ -3406,24 +3413,25 @@
"type": "tidelift"
}
],
- "time": "2021-02-19T12:13:01+00:00"
+ "time": "2021-07-28T13:41:28+00:00"
},
{
"name": "symfony/process",
- "version": "v4.4.25",
+ "version": "v4.4.27",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "cd61e6dd273975c6625316de9d141ebd197f93c9"
+ "reference": "0b7dc5599ac4aa6d7b936c8f7d10abae64f6cf7f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/cd61e6dd273975c6625316de9d141ebd197f93c9",
- "reference": "cd61e6dd273975c6625316de9d141ebd197f93c9",
+ "url": "https://api.github.com/repos/symfony/process/zipball/0b7dc5599ac4aa6d7b936c8f7d10abae64f6cf7f",
+ "reference": "0b7dc5599ac4aa6d7b936c8f7d10abae64f6cf7f",
"shasum": ""
},
"require": {
- "php": ">=7.1.3"
+ "php": ">=7.1.3",
+ "symfony/polyfill-php80": "^1.16"
},
"type": "library",
"autoload": {
@@ -3451,7 +3459,7 @@
"description": "Executes commands in sub-processes",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/process/tree/v4.4.25"
+ "source": "https://github.com/symfony/process/tree/v4.4.27"
},
"funding": [
{
@@ -3467,7 +3475,7 @@
"type": "tidelift"
}
],
- "time": "2021-05-26T11:20:16+00:00"
+ "time": "2021-07-23T15:41:52+00:00"
},
{
"name": "symfony/service-contracts",
@@ -3550,16 +3558,16 @@
},
{
"name": "symfony/yaml",
- "version": "v4.4.25",
+ "version": "v4.4.29",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
- "reference": "81cdac5536925c1c4b7b50aabc9ff6330b9eb5fc"
+ "reference": "3abcc4db06d4e776825eaa3ed8ad924d5bc7432a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/81cdac5536925c1c4b7b50aabc9ff6330b9eb5fc",
- "reference": "81cdac5536925c1c4b7b50aabc9ff6330b9eb5fc",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/3abcc4db06d4e776825eaa3ed8ad924d5bc7432a",
+ "reference": "3abcc4db06d4e776825eaa3ed8ad924d5bc7432a",
"shasum": ""
},
"require": {
@@ -3601,7 +3609,7 @@
"description": "Loads and dumps YAML files",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/yaml/tree/v4.4.25"
+ "source": "https://github.com/symfony/yaml/tree/v4.4.29"
},
"funding": [
{
@@ -3617,20 +3625,20 @@
"type": "tidelift"
}
],
- "time": "2021-05-26T17:39:37+00:00"
+ "time": "2021-07-27T16:19:30+00:00"
},
{
"name": "theseer/tokenizer",
- "version": "1.2.0",
+ "version": "1.2.1",
"source": {
"type": "git",
"url": "https://github.com/theseer/tokenizer.git",
- "reference": "75a63c33a8577608444246075ea0af0d052e452a"
+ "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a",
- "reference": "75a63c33a8577608444246075ea0af0d052e452a",
+ "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e",
+ "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e",
"shasum": ""
},
"require": {
@@ -3659,7 +3667,7 @@
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
"support": {
"issues": "https://github.com/theseer/tokenizer/issues",
- "source": "https://github.com/theseer/tokenizer/tree/master"
+ "source": "https://github.com/theseer/tokenizer/tree/1.2.1"
},
"funding": [
{
@@ -3667,7 +3675,7 @@
"type": "github"
}
],
- "time": "2020-07-12T23:59:07+00:00"
+ "time": "2021-07-28T10:34:58+00:00"
},
{
"name": "webmozart/assert",
diff --git a/themes/grav/app/utils/cookies.js b/themes/grav/app/utils/cookies.js
index 237c7592..40184ddc 100644
--- a/themes/grav/app/utils/cookies.js
+++ b/themes/grav/app/utils/cookies.js
@@ -13,7 +13,6 @@ const factory = function(window) {
}
const Cookies = (key, value, options) => {
- alert('a');
return arguments.length === 1
? Cookies.get(key)
: Cookies.set(key, value, options);
diff --git a/themes/grav/templates/config.html.twig b/themes/grav/templates/config.html.twig
index ffd1bf63..97db65d9 100644
--- a/themes/grav/templates/config.html.twig
+++ b/themes/grav/templates/config.html.twig
@@ -9,8 +9,8 @@
{% set isInfo = (config_slug == 'info') %}
{% set tab_title_string = "PLUGIN_ADMIN." ~ config_slug|upper %}
-{% set tab_title = (tab_title_string|tu == tab_title_string ? config_slug|capitalize : tab_title_string|tu) ?: 'Not Found' %}
-{% set title = "PLUGIN_ADMIN.CONFIGURATION"|tu ~ ": " ~ tab_title %}
+{% set tab_title = (tab_title_string|t == tab_title_string ? config_slug|capitalize : tab_title_string|t) ?: 'Not Found' %}
+{% set title = "PLUGIN_ADMIN.CONFIGURATION"|t ~ ": " ~ tab_title %}
{% if config_slug and not isInfo %}
{% set data = admin.data('config/' ~ config_slug) %}
@@ -27,17 +27,17 @@
{% block titlebar %}
- {{ "PLUGIN_ADMIN.CONFIGURATION"|tu }} - {{ tab_title }}
+ {{ "PLUGIN_ADMIN.CONFIGURATION"|t }} - {{ tab_title }}
{% endblock %}
{% block content_top %}
{% if authorize('admin.super') and data.file.filename %}
- {{ "PLUGIN_ADMIN.SAVE_LOCATION"|tu }}: {{ data.file.filename|replace({(base_path):''}) }}
+ {{ "PLUGIN_ADMIN.SAVE_LOCATION"|t }}: {{ data.file.filename|replace({(base_path):''}) }}
{% endif %}
diff --git a/themes/grav/templates/dashboard.html.twig b/themes/grav/templates/dashboard.html.twig
index 4ebfde3f..67cd2c21 100644
--- a/themes/grav/templates/dashboard.html.twig
+++ b/themes/grav/templates/dashboard.html.twig
@@ -1,6 +1,6 @@
{% extends 'partials/base.html.twig' %}
-{% set title = "PLUGIN_ADMIN.DASHBOARD"|tu %}
+{% set title = "PLUGIN_ADMIN.DASHBOARD"|t %}
{% set clear_cache_url = base_url_relative ~ '/cache.json/task' ~ config.system.param_sep ~ 'clearCache'|e('html_attr') %}
@@ -8,25 +8,25 @@
- {{ "PLUGIN_ADMIN.DASHBOARD"|tu }}
+ {{ "PLUGIN_ADMIN.DASHBOARD"|t }}
{% endblock %}
{% block widgets %}
diff --git a/themes/grav/templates/denied.html.twig b/themes/grav/templates/denied.html.twig
index 90564798..aa73c58c 100644
--- a/themes/grav/templates/denied.html.twig
+++ b/themes/grav/templates/denied.html.twig
@@ -5,12 +5,12 @@
{% block content %}
- {{ "PLUGIN_ADMIN.ACCESS_DENIED"|tu }}
+ {{ "PLUGIN_ADMIN.ACCESS_DENIED"|t }}
{% include 'partials/messages.html.twig' %}
-
{{ admin.user.fullname }}, {{ "PLUGIN_ADMIN.ACCOUNT_NOT_ADMIN"|tu }}. {{ "PLUGIN_ADMIN.LOGOUT"|tu }}
+
{{ admin.user.fullname }}, {{ "PLUGIN_ADMIN.ACCOUNT_NOT_ADMIN"|t }}. {{ "PLUGIN_ADMIN.LOGOUT"|t }}
{% endblock %}
diff --git a/themes/grav/templates/email/base.html.twig b/themes/grav/templates/email/base.html.twig
index 278b2ec3..f68a7530 100644
--- a/themes/grav/templates/email/base.html.twig
+++ b/themes/grav/templates/email/base.html.twig
@@ -179,7 +179,7 @@
- {{ 'PLUGIN_ADMIN.EMAIL_FOOTER'|tu|raw }}
+ {{ 'PLUGIN_ADMIN.EMAIL_FOOTER'|t|raw }}
diff --git a/themes/grav/templates/error.html.twig b/themes/grav/templates/error.html.twig
index fdeb4951..1446d3cf 100644
--- a/themes/grav/templates/error.html.twig
+++ b/themes/grav/templates/error.html.twig
@@ -1,7 +1,7 @@
{% extends 'partials/base.html.twig' %}
{% block titlebar %}
- {{ "PLUGIN_ADMIN.ERROR"|tu }}
+ {{ "PLUGIN_ADMIN.ERROR"|t }}
{% endblock %}
{% block content %}
diff --git a/themes/grav/templates/forgot.html.twig b/themes/grav/templates/forgot.html.twig
index e7d9ef0c..02a2c3b8 100644
--- a/themes/grav/templates/forgot.html.twig
+++ b/themes/grav/templates/forgot.html.twig
@@ -1,17 +1,12 @@
{% embed 'partials/login.html.twig' with {title:'Grav Forgot Password'} %}
{% block form %}
- {% for field_name,field in form.fields %}
- {% if field.type %}
- {% set field = field|merge({ name: field.name ?? field_name }) %}
- {% set value = form.value(field.name) %}
-
- {% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
-
- {% endif %}
- {% endfor %}
+ {% embed 'forms/default/fields.html.twig' with {name: null, fields: form.fields} %}
+ {% block inner_markup_field_open %}{% endblock %}
+ {% block inner_markup_field_close %}
{% endblock %}
+ {% endembed %}
- {{ "PLUGIN_ADMIN.LOGIN_BTN_SEND_INSTRUCTIONS"|tu }}
+ {{ "PLUGIN_ADMIN.LOGIN_BTN_SEND_INSTRUCTIONS"|t }}
{% endblock %}
diff --git a/themes/grav/templates/forms/field.html.twig b/themes/grav/templates/forms/field.html.twig
index 9205c973..e6c16b22 100644
--- a/themes/grav/templates/forms/field.html.twig
+++ b/themes/grav/templates/forms/field.html.twig
@@ -46,15 +46,15 @@
{% block label %}
{% if field.help %}
{% if field.markdown %}
- {{ field.label|tu|markdown(false)|raw }}
+ {{ field.label|t|markdown(false)|raw }}
{% else %}
- {{ field.label|tu|raw }}
+ {{ field.label|t|raw }}
{% endif %}
{% else %}
{% if field.markdown %}
- {{ field.label|tu|markdown(false)|raw }}
+ {{ field.label|t|markdown(false)|raw }}
{% else %}
- {{ field.label|tu|raw }}
+ {{ field.label|t|raw }}
{% endif %}
{% endif %}
{{ field.validate.required in ['on', 'true', 1] ? '* ' }}
@@ -63,9 +63,9 @@
{% if field.sublabel %}
{% if field.markdown %}
- {{ field.sublabel|tu|markdown(false)|raw }}
+ {{ field.sublabel|t|markdown(false)|raw }}
{% else %}
- {{ field.sublabel|tu|raw }}
+ {{ field.sublabel|t|raw }}
{% endif %}
{% endif %}
@@ -93,18 +93,18 @@
{# input attribute structures #}
{% block input_attributes %}
{% if field.classes is defined %}class="{{ field.classes }}" {% endif %}
- {% if field.id is defined %}id="{{ field.id|e }}" {% endif %}
- {% if field.style is defined %}style="{{ field.style|e }}" {% endif %}
+ {% if field.id is defined %}id="{{ field.id }}" {% endif %}
+ {% if field.style is defined %}style="{{ field.style }}" {% endif %}
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}
- {% if field.placeholder %}placeholder="{{ field.placeholder|tu }}"{% endif %}
+ {% if field.placeholder %}placeholder="{{ field.placeholder|t }}"{% endif %}
{% if field.autofocus in ['on', 'true', 1] %}autofocus="autofocus"{% endif %}
{% if field.novalidate in ['on', 'true', 1] %}novalidate="novalidate"{% endif %}
{% if field.readonly in ['on', 'true', 1] %}readonly="readonly"{% endif %}
{% if field.autocomplete is defined %}autocomplete="{{ field.autocomplete }}"{% endif %}
{% if field.validate.required in ['on', 'true', 1] %}required="required"{% endif %}
{% if field.validate.pattern %}pattern="{{ field.validate.pattern }}"{% endif %}
- {% if field.validate.message %}title="{{ field.validate.message|e|tu }}"
- {% elseif field.title is defined %}title="{{ field.title|e|tu }}" {% endif %}
+ {% if field.validate.message %}title="{{ field.validate.message|t }}"
+ {% elseif field.title is defined %}title="{{ field.title|t }}" {% endif %}
{% endblock %}
/>
{% block append %}{% endblock append %}
@@ -115,9 +115,9 @@
diff --git a/themes/grav/templates/forms/fields/acl_picker/acl_picker.html.twig b/themes/grav/templates/forms/fields/acl_picker/acl_picker.html.twig
index c955cc01..766d5641 100644
--- a/themes/grav/templates/forms/fields/acl_picker/acl_picker.html.twig
+++ b/themes/grav/templates/forms/fields/acl_picker/acl_picker.html.twig
@@ -2,7 +2,6 @@
{% block input %}
{% set permissions = grav.permissions %}
- {% set tu = grav.twig.twig.filters['tu'] is defined %}
{% set classes = { '': 'status-unchecked', 1: 'status-checked', 0: 'status-indeterminate' } %}
{% set states = { '': 0, 1: 1, 0: 2 } %}
@@ -10,14 +9,14 @@
{% set groupsList = [] %}
{% for action in permissions %}
{% if (action.visible ?? true) %}
- {% set groupsList = groupsList|merge([{ label: action.label|tu, value: action.name }]) %}
+ {% set groupsList = groupsList|merge([{ label: action.label|t, value: action.name }]) %}
{% endif %}
{% endfor %}
{% set optionsList = [] %}
{% for action in permissions.instances %}
{% if (action.visible ?? true) %}
- {% set label = (action.params.letter ? action.parent.label|tu ~ ' > ') ~ action.label|tu %}
+ {% set label = (action.params.letter ? action.parent.label|t ~ ' > ') ~ action.label|t %}
{% set optionsList = optionsList|merge([{ text: label ~ ' (' ~ action.name ~ ')', value: action.name, optgroup: action.scope }]) %}
{% endif %}
{% endfor %}
@@ -50,11 +49,11 @@
- {{ tu ? 'PLUGIN_ADMIN.ALLOWED'|tu : 'PLUGIN_ADMIN.ALLOWED'|t }}
+ {{ 'PLUGIN_ADMIN.ALLOWED'|t }}
- {{ tu ? 'PLUGIN_ADMIN.DENIED'|tu : 'PLUGIN_ADMIN.DENIED'|t }}
+ {{ 'PLUGIN_ADMIN.DENIED'|t }}
{% elseif field.data_type == 'permissions' %}
@@ -99,12 +98,12 @@
{% set rnd = random(100) %}
- {{ tu ? 'PLUGIN_ADMIN.ALLOWED'|tu : 'PLUGIN_ADMIN.ALLOWED'|t }}
+ {{ 'PLUGIN_ADMIN.ALLOWED'|t }}
{% set rnd = random(100) %}
- {{ tu ? 'PLUGIN_ADMIN.DENIED'|tu : 'PLUGIN_ADMIN.DENIED'|t }}
+ {{ 'PLUGIN_ADMIN.DENIED'|t }}
{% elseif field.data_type == 'permissions' %}
diff --git a/themes/grav/templates/forms/fields/array/array.html.twig b/themes/grav/templates/forms/fields/array/array.html.twig
index 7bf5c98b..0884750c 100644
--- a/themes/grav/templates/forms/fields/array/array.html.twig
+++ b/themes/grav/templates/forms/fields/array/array.html.twig
@@ -15,23 +15,23 @@
data-grav-array-type="key"
type="text" value="{{ key }}"
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}
- placeholder="{{ field.placeholder_key|e|tu }}" />
+ placeholder="{{ field.placeholder_key|t }}" />
{% endif %}
{% if field.value_type == 'textarea' %}
{% else %}
+ value={% if text == 'true' %}true{% elseif text == 'false' %}false{% else %}"{{ text|join(', ') }}"{% endif %} />
{% endif %}
@@ -44,8 +44,8 @@
{% block global_attributes %}
data-grav-array-name="{{ (scope ~ field.name)|fieldName }}"
- data-grav-array-keyname="{{ field.placeholder_key|e|tu }}"
- data-grav-array-valuename="{{ field.placeholder_value|e|tu }}"
+ data-grav-array-keyname="{{ field.placeholder_key|t }}"
+ data-grav-array-valuename="{{ field.placeholder_value|t }}"
data-grav-array-textarea="{{ field.value_type == 'textarea' }}"
{{ parent() }}
{% endblock %}
@@ -72,21 +72,21 @@
data-grav-array-type="key"
type="text"
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}
- placeholder="{{ field.placeholder_key|e|tu }}" />
+ placeholder="{{ field.placeholder_key|t }}" />
{% endif %}
{% if field.value_type == 'textarea' %}
+ placeholder="{{ field.placeholder_value|t }}">
{% else %}
+ placeholder="{{ field.placeholder_value|t }}" />
{% endif %}
diff --git a/themes/grav/templates/forms/fields/backupshistory/backupshistory.html.twig b/themes/grav/templates/forms/fields/backupshistory/backupshistory.html.twig
index fc530226..ad219f60 100644
--- a/themes/grav/templates/forms/fields/backupshistory/backupshistory.html.twig
+++ b/themes/grav/templates/forms/fields/backupshistory/backupshistory.html.twig
@@ -3,10 +3,10 @@
#
- {{ "PLUGIN_ADMIN.BACKUP_DATE"|tu }}
- {{ "PLUGIN_ADMIN.NAME"|tu }}
- {{ "PLUGIN_ADMIN.SIZE"|tu }}
- {{ "PLUGIN_ADMIN.ACTION"|tu }}
+ {{ "PLUGIN_ADMIN.BACKUP_DATE"|t }}
+ {{ "PLUGIN_ADMIN.NAME"|t }}
+ {{ "PLUGIN_ADMIN.SIZE"|t }}
+ {{ "PLUGIN_ADMIN.ACTION"|t }}
@@ -25,7 +25,7 @@
{% else %}
- {{ "PLUGIN_ADMIN.BACKUPS_NOT_GENERATED"|tu }}
+ {{ "PLUGIN_ADMIN.BACKUPS_NOT_GENERATED"|t }}
{% endfor %}
diff --git a/themes/grav/templates/forms/fields/colorpicker/colorpicker.html.twig b/themes/grav/templates/forms/fields/colorpicker/colorpicker.html.twig
index 7943fbe2..163d355f 100644
--- a/themes/grav/templates/forms/fields/colorpicker/colorpicker.html.twig
+++ b/themes/grav/templates/forms/fields/colorpicker/colorpicker.html.twig
@@ -16,8 +16,8 @@
{# input attribute structures #}
{% block input_attributes %}
{% if field.classes is defined %}class="{{ field.classes }}" {% endif %}
- {% if field.id is defined %}id="{{ field.id|e }}" {% endif %}
- {% if field.style is defined %}style="{{ field.style|e }}" {% endif %}
+ {% if field.id is defined %}id="{{ field.id }}" {% endif %}
+ {% if field.style is defined %}style="{{ field.style }}" {% endif %}
{% if field.disabled %}disabled="disabled"{% endif %}
{% if field.placeholder %}placeholder="{{ field.placeholder }}"{% endif %}
{% if field.autofocus in ['on', 'true', 1] %}autofocus="autofocus"{% endif %}
@@ -26,12 +26,12 @@
{% if field.autocomplete in ['on', 'off'] %}autocomplete="{{ field.autocomplete }}"{% endif %}
{% if field.validate.required in ['on', 'true', 1] %}required="required"{% endif %}
pattern="{{ field.validate.pattern|default(pattern)|raw }}"
- {% if field.validate.message %}title="{{ field.validate.message|e|t }}"
- {% elseif field.title is defined %}title="{{ field.title|e|t }}" {% endif %}
+ {% if field.validate.message %}title="{{ field.validate.message|t }}"
+ {% elseif field.title is defined %}title="{{ field.title|t }}" {% endif %}
{% endblock %}
/>
diff --git a/themes/grav/templates/forms/fields/colorscheme.color/colorscheme.color.html.twig b/themes/grav/templates/forms/fields/colorscheme.color/colorscheme.color.html.twig
index 80042df0..67e7b2be 100644
--- a/themes/grav/templates/forms/fields/colorscheme.color/colorscheme.color.html.twig
+++ b/themes/grav/templates/forms/fields/colorscheme.color/colorscheme.color.html.twig
@@ -8,7 +8,7 @@
{% block input %}
-
{{ field.help|e|tu }}
+
{{ field.help|t }}
diff --git a/themes/grav/templates/forms/fields/colorscheme/colorscheme.html.twig b/themes/grav/templates/forms/fields/colorscheme/colorscheme.html.twig
index dc1a549e..e0276ae2 100644
--- a/themes/grav/templates/forms/fields/colorscheme/colorscheme.html.twig
+++ b/themes/grav/templates/forms/fields/colorscheme/colorscheme.html.twig
@@ -5,12 +5,7 @@
{% block input %}
- {% for field in field.fields %}
- {% if field.type %}
- {% set value = data.value(field.name) %}
- {% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
- {% endif %}
- {% endfor %}
+ {% include 'forms/default/fields.html.twig' with {name: field.name, fields: field.fields} %}
{% endblock %}
diff --git a/themes/grav/templates/forms/fields/column/column.html.twig b/themes/grav/templates/forms/fields/column/column.html.twig
index b332fdd1..6c5d4264 100644
--- a/themes/grav/templates/forms/fields/column/column.html.twig
+++ b/themes/grav/templates/forms/fields/column/column.html.twig
@@ -1,14 +1,8 @@
{% extends "forms/field.html.twig" %}
{% block field %}
-{% if field.fields %}
-
- {% for child in field.fields %}
- {% if child.type and not child.validate.ignore %}
- {% set value = child.name ? (form.value(child.name) ?? data.value(child.name)) : data.toArray %}
- {% include ["forms/fields/#{child.type}/#{child.type}.html.twig", 'forms/fields/text/text.html.twig'] with {field: child} %}
- {% endif %}
- {% endfor %}
-
-{% endif %}
+ {% embed 'forms/default/fields.html.twig' with {name: field.name, fields: field.fields} %}
+ {% block outer_markup_field_open %}
{% endblock %}
+ {% block outer_markup_field_close %}
{% endblock %}
+ {% endembed %}
{% endblock %}
diff --git a/themes/grav/templates/forms/fields/columns/columns.html.twig b/themes/grav/templates/forms/fields/columns/columns.html.twig
index ab994d05..1a8fc00b 100644
--- a/themes/grav/templates/forms/fields/columns/columns.html.twig
+++ b/themes/grav/templates/forms/fields/columns/columns.html.twig
@@ -2,11 +2,7 @@
{% block field %}
-{% if field.fields %}
{% set cols = field.fields|length %}
- {% for child in field.fields %}
- {% include ["forms/fields/#{child.type}/#{child.type}.html.twig", 'forms/fields/column/column.html.twig'] with {field: child, cols: cols} %}
- {% endfor %}
-{% endif %}
+ {% include 'forms/default/fields.html.twig' with {name: field.name, fields: field.fields, fallback_field: 'column', cols: cols} %}
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/themes/grav/templates/forms/fields/dateformat/dateformat.html.twig b/themes/grav/templates/forms/fields/dateformat/dateformat.html.twig
index 92d7999d..87435ecd 100644
--- a/themes/grav/templates/forms/fields/dateformat/dateformat.html.twig
+++ b/themes/grav/templates/forms/fields/dateformat/dateformat.html.twig
@@ -17,7 +17,7 @@
{% if field.form %}form="{{ field.form }}"{% endif %}
>
{% for key, text in field.options %}
-
{{ key is empty ? text : "now"|date(key)|e }}
+
{{ key is empty ? text : "now"|date(key) }}
{% endfor %}
diff --git a/themes/grav/templates/forms/fields/editor/editor.html.twig b/themes/grav/templates/forms/fields/editor/editor.html.twig
index 46f1b888..9816c232 100644
--- a/themes/grav/templates/forms/fields/editor/editor.html.twig
+++ b/themes/grav/templates/forms/fields/editor/editor.html.twig
@@ -4,7 +4,7 @@
{% set theme = whitelabel.codemirror_theme ?? 'paper.css' %}
{% set fontsize = whitelabel.codemirror_fontsize ?? 'lg' %}
-{% set value = value ?? field.default|tu %}
+{% set value = value ?? field.default|t %}
{% if not codemirrorOptions %}
{% set codemirrorOptions = {'mode': 'gfm', 'theme': theme, 'ignore': ['code', 'preview'], 'font': 'mono'}|merge(field.codemirror|default({})) %}
{% endif %}
@@ -17,10 +17,10 @@
{% block label %}
{% if field.label %}
{% if field.help %}
- {% set hint = 'data-hint="' ~ field.help|tu|raw ~ '"' %}
+ {% set hint = 'data-hint="' ~ field.help|t|raw ~ '"' %}
{% endif %}
- {{ field.label|tu|raw }}
+ {{ field.label|t|raw }}
{{ field.validate.required in ['on', 'true', 1] ? '* ' }}
{% endif %}
@@ -34,25 +34,25 @@
data-grav-editor-mode="editor"
name="{{ (scope ~ field.name)|fieldName }}"
{% if field.classes is defined %}class="{{ field.classes }}" {% endif %}
- {% if field.id is defined %}id="{{ field.id|e }}" {% endif %}
- {% if field.style is defined %}style="{{ field.style|e }}" {% endif %}
+ {% if field.id is defined %}id="{{ field.id }}" {% endif %}
+ {% if field.style is defined %}style="{{ field.style }}" {% endif %}
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}
- {% if field.placeholder %}placeholder="{{ field.placeholder|tu }}"{% endif %}
+ {% if field.placeholder %}placeholder="{{ field.placeholder|t }}"{% endif %}
{% if field.autofocus in ['on', 'true', 1] %}autofocus="autofocus"{% endif %}
{% if field.novalidate in ['on', 'true', 1] %}novalidate="novalidate"{% endif %}
{% 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 %}
- >{{ input_value|e('html') }}
+ >{{ input_value }}
{% 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/fieldset/fieldset.html.twig b/themes/grav/templates/forms/fields/fieldset/fieldset.html.twig
index 6bc4762d..e011d843 100644
--- a/themes/grav/templates/forms/fields/fieldset/fieldset.html.twig
+++ b/themes/grav/templates/forms/fields/fieldset/fieldset.html.twig
@@ -9,16 +9,16 @@
{% if field.help %}
-
+
{% endif %}
{% block label %}
{% if field.icon %}
{% endif %}
- {{ field.title|tu }}
+ {{ field.title|t }}
{{ field.validate.required in ['on', 'true', 1] ? '* ' }}
{% if field.info %}
- {{ field.info|tu }}
+ {{ field.info|t }}
{% endif %}
{% endblock %}
{% if field.help %}
@@ -49,52 +49,32 @@
{% block group %}
{% if field.text %}
- {% if grav.twig.twig.filters['tu'] is defined %}
- {{ field.markdown ? field.text|tu|markdown : ('' ~ field.text|tu ~ '
')|raw }}
- {% else %}
- {{ field.markdown ? field.text|t|markdown : ('' ~ field.t ~ '
')|raw }}
- {% endif %}
+ {{ field.markdown ? field.text|t|markdown : ('' ~ field.t ~ '
')|raw }}
{% endif %}
{% if field.fields %}
- {% for childName, child in field.fields %}
- {%- if childName == 'value' -%}
- {% set childKey = '' %}
- {% set childValue = val %}
- {% set childName = field.name -%}
- {%- elseif childName starts with '.' -%}
- {% set childKey = childName|trim('.') %}
- {% set childValue = val|nested(childName) %}
- {% set childName = field.name ~ childName %}
- {% else %}
- {% set childKey = childName %}
- {% set childValue = data.value(childName) %}
- {% set childName = childName|replace({'*': key}) %}
- {% endif %}
- {% set child = child|merge({ name: childName }) %}
+ {% for child_name, child in field.fields %}
+ {% set child = prepare_form_field(child, child_name, field.name, key) %}
+ {% if child %}
+ {% set default_layout = 'text' %}
+ {% if child.type == 'key' or child.key == true %}
+ {# Special handling for the key field #}
+ {% set default_layout = 'key' %}
+ {% set child_value = key %}
+ {% elseif child.name == 'value' %}
+ {# Special handling for the value field #}
+ {% set child = child|merge({ name: field.name }) %}
+ {% set child_value = value %}
+ {% else %}
+ {% set child_value = form ? form.value(child.name) : data.value(child.name) %}
+ {% endif %}
- {% 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 %}
- {%
- include [
- "forms/fields/#{child.type}/#{child.type}.html.twig",
- 'forms/fields/text/text.html.twig'
- ] with { field: child, value: childValue }
- %}
+ {% set field_templates = include_form_field(child.type, field_layout, default_layout) %}
+ {% include field_templates with { field: child, value: child_value } %}
{% endif %}
{% endfor %}
{% endif %}
- {% endblock %}
+ {% endblock %}
{% endblock %}
diff --git a/themes/grav/templates/forms/fields/file/file.html.twig b/themes/grav/templates/forms/fields/file/file.html.twig
index fa2f384f..8e06edf4 100644
--- a/themes/grav/templates/forms/fields/file/file.html.twig
+++ b/themes/grav/templates/forms/fields/file/file.html.twig
@@ -113,6 +113,6 @@
{% else %}
- {{ "PLUGIN_ADMIN.CANNOT_ADD_FILES_PAGE_NOT_SAVED"|tu|raw }}
+ {{ "PLUGIN_ADMIN.CANNOT_ADD_FILES_PAGE_NOT_SAVED"|t|raw }}
{% endif %}
{% endblock %}
diff --git a/themes/grav/templates/forms/fields/folder-slug/folder-slug.html.twig b/themes/grav/templates/forms/fields/folder-slug/folder-slug.html.twig
index 9ce0491b..0246c06e 100644
--- a/themes/grav/templates/forms/fields/folder-slug/folder-slug.html.twig
+++ b/themes/grav/templates/forms/fields/folder-slug/folder-slug.html.twig
@@ -2,7 +2,7 @@
{% set field = field|merge({'wrapper_classes': 'form-input-addon-wrapper'}) %}
{% block append %}
-
diff --git a/themes/grav/templates/forms/fields/multilevel/multilevel.html.twig b/themes/grav/templates/forms/fields/multilevel/multilevel.html.twig
index 92d634f6..20f527d4 100644
--- a/themes/grav/templates/forms/fields/multilevel/multilevel.html.twig
+++ b/themes/grav/templates/forms/fields/multilevel/multilevel.html.twig
@@ -12,8 +12,8 @@
type="text"
{% if (disable_name != true) %}name="{{ name }}"{% endif %}
data-attr-name="{{ name }}"
- placeholder="{{ field.placeholder_value|e|tu }}"
- style="{{ marginDir }}: {{ level * 50 }}px"
+ placeholder="{{ field.placeholder_value|t }}"
+ style="{{ marginDir }}: {{ level * 50 }}px"
value="{{ value }}" />
@@ -86,8 +86,8 @@
{% block global_attributes %}
data-grav-array-name="{{ (scope ~ field.name)|fieldName }}"
- data-grav-array-keyname="{{ field.placeholder_key|e|tu }}"
- data-grav-array-valuename="{{ field.placeholder_value|e|tu }}"
+ data-grav-array-keyname="{{ field.placeholder_key|t }}"
+ data-grav-array-valuename="{{ field.placeholder_value|t }}"
{{ parent() }}
{% endblock %}
diff --git a/themes/grav/templates/forms/fields/order/order.html.twig b/themes/grav/templates/forms/fields/order/order.html.twig
index 70cde9a8..42a1732c 100644
--- a/themes/grav/templates/forms/fields/order/order.html.twig
+++ b/themes/grav/templates/forms/fields/order/order.html.twig
@@ -19,9 +19,9 @@
diff --git a/themes/grav/templates/forms/fields/pagemedia/pagemedia.html.twig b/themes/grav/templates/forms/fields/pagemedia/pagemedia.html.twig
index b93b3901..06bec69b 100644
--- a/themes/grav/templates/forms/fields/pagemedia/pagemedia.html.twig
+++ b/themes/grav/templates/forms/fields/pagemedia/pagemedia.html.twig
@@ -29,7 +29,7 @@
@@ -50,7 +50,7 @@
diff --git a/themes/grav/templates/forms/fields/permissions/permissions.html.twig b/themes/grav/templates/forms/fields/permissions/permissions.html.twig
index fa3d50a0..c5b4a333 100644
--- a/themes/grav/templates/forms/fields/permissions/permissions.html.twig
+++ b/themes/grav/templates/forms/fields/permissions/permissions.html.twig
@@ -8,7 +8,7 @@
{% macro section(section, context, depth) %}
{% import _self as macro %}
- {% set section_label = context.tu ? (section.label ?? section.name)|tu : (section.label ?? section.name)|t %}
+ {% set section_label = (section.label ?? section.name)|t %}
{# Sub sections can have top-level toggle.. needs to #}
{% if depth > 0 %}
@@ -67,12 +67,11 @@
{% import _self as macro %}
{% set context = data.context %}
- {% set tu = context.tu %}
{% set field = context.field %}
-
{{ tu ? data.action_label|tu :data.action_label|t }}
+
{{ data.action_label|t }}
{% if context.auth_badges %}
{% set auth = context.object.authorize(data.action_name, 'test') ?? context.super %}
{% if context.super and auth %}
@@ -89,7 +88,7 @@
{% for key, text in context.options %}
{% set parent_id = data.action_parent ? "toggle_" ~ field.name ~ "." ~ data.action_parent %}
{% set id = "toggle_" ~ field.name ~ "." ~ data.action_name ~ key %}
- {% set translation = (tu ? text|tu : text|t)|trim %}
+ {% set translation = text|t|trim %}
{% if grav.twig.twig.filters['tu'] is defined %}{{ field.title|tu }}{% else %}{{ field.title|t }}{% endif %}
+
{{ field.title|t }}
{% endif %}
{% if field.text %}
-
{% if grav.twig.twig.filters['tu'] is defined %}{{ field.text|tu|markdown|raw }}{% else %}{{ field.text|t|markdown|raw }}{% endif %}
+
{{ field.text|t|markdown|raw }}
{% endif %}
- {% if field.fields %}
-
- {% for field in field.fields %}
- {% if field.type %}
- {% set value = field.name ? (form.value(field.name) ?? data.value(field.name)) : data.toArray %}
- {% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
- {% endif %}
- {% endfor %}
-
- {% endif %}
+ {% embed 'forms/default/fields.html.twig' with {name: field.name, fields: field.fields} %}
+ {% block outer_markup_field_open %}
+
+ {% endblock %}
+ {% block outer_markup_field_close %}
+
+ {% endblock %}
+ {% endembed %}
{% endif %}
{% endblock %}
diff --git a/themes/grav/templates/forms/fields/selectunique/selectunique.html.twig b/themes/grav/templates/forms/fields/selectunique/selectunique.html.twig
index 936f1da7..1d09b83b 100644
--- a/themes/grav/templates/forms/fields/selectunique/selectunique.html.twig
+++ b/themes/grav/templates/forms/fields/selectunique/selectunique.html.twig
@@ -15,8 +15,8 @@
data-select-observe
{% block input_attributes %}
{% if field.classes is defined %}class="{{ field.classes }}" {% endif %}
- {% if field.id is defined %}id="{{ field.id|e }}" {% endif %}
- {% if field.style is defined %}style="{{ field.style|e }}" {% endif %}
+ {% if field.id is defined %}id="{{ field.id }}" {% endif %}
+ {% if field.style is defined %}style="{{ field.style }}" {% endif %}
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}
{% if field.placeholder %}placeholder="{{ field.placeholder }}"{% endif %}
{% if field.autofocus in ['on', 'true', 1] %}autofocus="autofocus"{% endif %}
@@ -25,11 +25,11 @@
{% if field.autocomplete in ['on', 'off'] %}autocomplete="{{ field.autocomplete }}"{% endif %}
{% if field.validate.required in ['on', 'true', 1] %}required="required"{% endif %}
{% if field.validate.pattern %}pattern="{{ field.validate.pattern }}"{% endif %}
- {% if field.validate.message %}title="{{ field.validate.message|e|t }}"
- {% elseif field.title is defined %}title="{{ field.title|e|t }}" {% endif %}
+ {% if field.validate.message %}title="{{ field.validate.message|t }}"
+ {% elseif field.title is defined %}title="{{ field.title|t }}" {% endif %}
{% endblock %}
>
- {% if field.placeholder %}
{% if grav.twig.twig.filters['tu'] is defined %}{{ field.placeholder|tu|raw }}{% else %}{{ field.placeholder|t|raw }}{% endif %} {% endif %}
+ {% if field.placeholder %}
{{ field.placeholder|t|raw }} {% endif %}
{% if value is defined %}
{{ value }}
diff --git a/themes/grav/templates/forms/fields/taxonomy/taxonomy.html.twig b/themes/grav/templates/forms/fields/taxonomy/taxonomy.html.twig
index 5e611f64..64d5434d 100644
--- a/themes/grav/templates/forms/fields/taxonomy/taxonomy.html.twig
+++ b/themes/grav/templates/forms/fields/taxonomy/taxonomy.html.twig
@@ -33,6 +33,6 @@
}
} %}
- {% include ['forms/fields/select/select.html.twig'] %}
+ {% include 'forms/fields/select/select.html.twig' %}
{% endfor %}
{% endblock %}
diff --git a/themes/grav/templates/forms/fields/themepreview/themepreview.html.twig b/themes/grav/templates/forms/fields/themepreview/themepreview.html.twig
index f23b1675..5b5b4f46 100644
--- a/themes/grav/templates/forms/fields/themepreview/themepreview.html.twig
+++ b/themes/grav/templates/forms/fields/themepreview/themepreview.html.twig
@@ -70,7 +70,7 @@
+
{{ "PLUGIN_ADMIN.XSS_ISSUE"|t(xss_status)|raw }}
{% endif %}
diff --git a/themes/grav/templates/installer.html.twig b/themes/grav/templates/installer.html.twig
index 062d00ac..f86515c9 100644
--- a/themes/grav/templates/installer.html.twig
+++ b/themes/grav/templates/installer.html.twig
@@ -4,7 +4,7 @@
{% block content %}
- {{ "PLUGIN_ADMIN.INSTALLER"|tu }}
+ {{ "PLUGIN_ADMIN.INSTALLER"|t }}
{% include 'partials/messages.html.twig' %}
diff --git a/themes/grav/templates/pages.html.twig b/themes/grav/templates/pages.html.twig
index d7bf2e2f..1911b206 100644
--- a/themes/grav/templates/pages.html.twig
+++ b/themes/grav/templates/pages.html.twig
@@ -26,11 +26,11 @@
{% endif %}
{% for p in pcol %}
- {% set description = (not p.page ? "PLUGIN_ADMIN.FOLDER"|tu ~ ' • ' : "PLUGIN_ADMIN.PAGE"|tu ~ ' • ') ~
- (p.isModule ? "PLUGIN_ADMIN.MODULE"|tu ~ ' • ' : '') ~
- (p.routable ? "PLUGIN_ADMIN.ROUTABLE"|tu ~ ' • ' : "PLUGIN_ADMIN.NON_ROUTABLE"|tu ~ ' • ') ~
- (p.visible ? "PLUGIN_ADMIN.VISIBLE"|tu ~ ' • ' : "PLUGIN_ADMIN.NON_VISIBLE"|tu ~ ' • ') ~
- (p.published ? "PLUGIN_ADMIN.PUBLISHED"|tu ~ ' • ' : "PLUGIN_ADMIN.NON_PUBLISHED"|tu ~ ' • ') %}
+ {% set description = (not p.page ? "PLUGIN_ADMIN.FOLDER"|t ~ ' • ' : "PLUGIN_ADMIN.PAGE"|t ~ ' • ') ~
+ (p.isModule ? "PLUGIN_ADMIN.MODULE"|t ~ ' • ' : '') ~
+ (p.routable ? "PLUGIN_ADMIN.ROUTABLE"|t ~ ' • ' : "PLUGIN_ADMIN.NON_ROUTABLE"|t ~ ' • ') ~
+ (p.visible ? "PLUGIN_ADMIN.VISIBLE"|t ~ ' • ' : "PLUGIN_ADMIN.NON_VISIBLE"|t ~ ' • ') ~
+ (p.published ? "PLUGIN_ADMIN.PUBLISHED"|t ~ ' • ' : "PLUGIN_ADMIN.NON_PUBLISHED"|t ~ ' • ') %}
{% set page_url = getPageUrl(p) %}
@@ -43,7 +43,7 @@
{% set page_label = attribute(p.header, display_field)|defined(attribute(p, display_field))|defined(p.title)|default(p.slug|titleize) %}
- {{ page_label|e }}
+ {{ page_label }}
{% if p.language %}
{{p.language}}
@@ -58,10 +58,10 @@
{% if config.plugins.admin.frontend_preview_target != 'inline' %}
{% set preview_target = config.plugins.admin.frontend_preview_target %}
{% set preview_route = (base_url_relative_frontend|rtrim('/') ~ (p.home ? '' : p.route)) ?: '/' %}
- {% set preview_link = p.routable ? '
' : '' %}
+ {% set preview_link = p.routable ? '
' : '' %}
{% else %}
{% set preview_route = admin_route('/preview' ~ (p.home ? '' : p.route)) %}
- {% set preview_link = p.routable ? '
' : '' %}
+ {% set preview_link = p.routable ? '
' : '' %}
{% endif %}
{{ preview_link|raw }}
{% if warn %}
@@ -101,13 +101,13 @@
{% if context.exists %}
{% set page_url = admin_route('/pages' ~ (context.header.routes.default ?: context.rawRoute)) %}
{% set exists = true %}
- {% set title = (context.exists ? "PLUGIN_ADMIN.EDIT"|tu : "PLUGIN_ADMIN.CREATE"|tu ) ~ " " ~ (context.header.title ?: context.title) %}
+ {% set title = (context.exists ? "PLUGIN_ADMIN.EDIT"|t : "PLUGIN_ADMIN.CREATE"|t ) ~ " " ~ (context.header.title ?: context.title) %}
{% else %}
- {% set title = "PLUGIN_ADMIN.ADD_PAGE"|tu %}
+ {% set title = "PLUGIN_ADMIN.ADD_PAGE"|t %}
{% endif %}
{% else %}
{% set mode = 'list' %}
- {% set title = "PLUGIN_ADMIN.PAGES"|tu %}
+ {% set title = "PLUGIN_ADMIN.PAGES"|t %}
{% endif %}
{% set modular = context.isModule ? 'modular_' : '' %}
@@ -130,40 +130,40 @@
{% if config.plugins.admin.frontend_preview_target != 'inline' %}
{% set preview_route = (base_url_relative_frontend|rtrim('/') ~ (context.home ? '' : context.route)) ?: '/' %}
{% set preview_target = config.plugins.admin.frontend_preview_target %}
- {% set preview_link = context.routable ? '
' : '' %}
+ {% set preview_link = context.routable ? '
' : '' %}
{% else %}
{% set preview_route = admin_route('/preview' ~ (context.home ? '' : context.route)) %}
- {% set preview_link = context.routable ? '
' : '' %}
+ {% set preview_link = context.routable ? '
' : '' %}
{% endif %}
{% block titlebar %}