Merge branch 'release/1.10.19'

This commit is contained in:
Andy Miller
2021-08-31 12:19:57 -06:00
110 changed files with 812 additions and 901 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -140,7 +140,7 @@ class LoginController extends AdminController
}
$post = $this->getPost();
$credentials = $post['data'] ?? [];
$credentials = (array)($post['data'] ?? []);
$login = $this->getLogin();
$config = $this->getConfig();

206
composer.lock generated
View File

@@ -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",

View File

@@ -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);

View File

@@ -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 %}
<div class="button-bar">
<a class="button" href="{{ admin_route('/') }}"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|tu }}</a>
<a class="button" href="{{ admin_route('/') }}"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|t }}</a>
{% if data.file.filename %}
<button class="button" type="submit" name="task" value="save" form="blueprints"><i class="fa fa-check"></i> {{ "PLUGIN_ADMIN.SAVE"|tu }}</button>
<button class="button" type="submit" name="task" value="save" form="blueprints"><i class="fa fa-check"></i> {{ "PLUGIN_ADMIN.SAVE"|t }}</button>
{% endif %}
</div>
<h1><i class="fa fa-fw fa-wrench"></i> {{ "PLUGIN_ADMIN.CONFIGURATION"|tu }} - {{ tab_title }}</h1>
<h1><i class="fa fa-fw fa-wrench"></i> {{ "PLUGIN_ADMIN.CONFIGURATION"|t }} - {{ tab_title }}</h1>
{% endblock %}
{% block content_top %}
{% if authorize('admin.super') and data.file.filename %}
<div class="alert notice">{{ "PLUGIN_ADMIN.SAVE_LOCATION"|tu }}: <b>{{ data.file.filename|replace({(base_path):''}) }}</b></div>
<div class="alert notice">{{ "PLUGIN_ADMIN.SAVE_LOCATION"|t }}: <b>{{ data.file.filename|replace({(base_path):''}) }}</b></div>
{% endif %}
<div class="form-tabs">
@@ -45,7 +45,7 @@
{% for configuration in configurations %}
<a {% if config_slug == configuration %}class="active"{% endif %} href="{{ admin_route('/config/' ~ configuration) }}">
{% set configuration_string = "PLUGIN_ADMIN." ~ configuration|upper %}
<span>{{ (configuration_string|tu == configuration_string ? configuration|capitalize : configuration_string|tu) }}</span>
<span>{{ (configuration_string|t == configuration_string ? configuration|capitalize : configuration_string|t) }}</span>
</a>
{% endfor %}
</div>

View File

@@ -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 @@
<div class="button-bar">
{% if authorize(['admin.maintenance', 'admin.super', 'admin.cache']) %}
<div class="button-group">
<button data-clear-cache-type="" data-clear-cache="{{ uri.addNonce(clear_cache_url, 'admin-form', 'admin-nonce') }}" class="button"><i class="fa fa-retweet"></i> {{ "PLUGIN_ADMIN.CLEAR_CACHE"|tu }}</button>
<button data-clear-cache-type="" data-clear-cache="{{ uri.addNonce(clear_cache_url, 'admin-form', 'admin-nonce') }}" class="button"><i class="fa fa-retweet"></i> {{ "PLUGIN_ADMIN.CLEAR_CACHE"|t }}</button>
<button type="button" class="button dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-caret-down"></i>
</button>
<ul class="dropdown-menu">
<li><a data-clear-cache-type="all" data-clear-cache="{{ uri.addNonce(clear_cache_url ~'/cleartype' ~ config.system.param_sep ~ 'all', 'admin-form', 'admin-nonce') }}" href="#">{{ "PLUGIN_ADMIN.CLEAR_CACHE_ALL_CACHE"|tu }}</a></li>
<li><a data-clear-cache-type="assets-only" data-clear-cache="{{ uri.addNonce(clear_cache_url ~'/cleartype' ~ config.system.param_sep ~ 'assets-only', 'admin-form', 'admin-nonce') }}" href="#">{{ "PLUGIN_ADMIN.CLEAR_CACHE_ASSETS_ONLY"|tu }}</a></li>
<li><a data-clear-cache-type="images-only" data-clear-cache="{{ uri.addNonce(clear_cache_url ~'/cleartype' ~ config.system.param_sep ~ 'images-only', 'admin-form', 'admin-nonce') }}" href="#">{{ "PLUGIN_ADMIN.CLEAR_CACHE_IMAGES_ONLY"|tu }}</a></li>
<li><a data-clear-cache-type="cache-only" data-clear-cache="{{ uri.addNonce(clear_cache_url ~'/cleartype' ~ config.system.param_sep ~ 'cache-only', 'admin-form', 'admin-nonce') }}" href="#">{{ "PLUGIN_ADMIN.CLEAR_CACHE_CACHE_ONLY"|tu }}</a></li>
<li><a data-clear-cache-type="tmp-only" data-clear-cache="{{ uri.addNonce(clear_cache_url ~'/cleartype' ~ config.system.param_sep ~ 'tmp-only', 'admin-form', 'admin-nonce') }}" href="#">{{ "PLUGIN_ADMIN.CLEAR_CACHE_TMP_ONLY"|tu }}</a></li>
<li><a data-clear-cache-type="purge" data-clear-cache="{{ uri.addNonce(clear_cache_url ~'/cleartype' ~ config.system.param_sep ~ 'purge', 'admin-form', 'admin-nonce') }}" href="#">{{ "PLUGIN_ADMIN.CACHE_PURGE"|tu }}</a></li>
<li><a data-clear-cache-type="all" data-clear-cache="{{ uri.addNonce(clear_cache_url ~'/cleartype' ~ config.system.param_sep ~ 'all', 'admin-form', 'admin-nonce') }}" href="#">{{ "PLUGIN_ADMIN.CLEAR_CACHE_ALL_CACHE"|t }}</a></li>
<li><a data-clear-cache-type="assets-only" data-clear-cache="{{ uri.addNonce(clear_cache_url ~'/cleartype' ~ config.system.param_sep ~ 'assets-only', 'admin-form', 'admin-nonce') }}" href="#">{{ "PLUGIN_ADMIN.CLEAR_CACHE_ASSETS_ONLY"|t }}</a></li>
<li><a data-clear-cache-type="images-only" data-clear-cache="{{ uri.addNonce(clear_cache_url ~'/cleartype' ~ config.system.param_sep ~ 'images-only', 'admin-form', 'admin-nonce') }}" href="#">{{ "PLUGIN_ADMIN.CLEAR_CACHE_IMAGES_ONLY"|t }}</a></li>
<li><a data-clear-cache-type="cache-only" data-clear-cache="{{ uri.addNonce(clear_cache_url ~'/cleartype' ~ config.system.param_sep ~ 'cache-only', 'admin-form', 'admin-nonce') }}" href="#">{{ "PLUGIN_ADMIN.CLEAR_CACHE_CACHE_ONLY"|t }}</a></li>
<li><a data-clear-cache-type="tmp-only" data-clear-cache="{{ uri.addNonce(clear_cache_url ~'/cleartype' ~ config.system.param_sep ~ 'tmp-only', 'admin-form', 'admin-nonce') }}" href="#">{{ "PLUGIN_ADMIN.CLEAR_CACHE_TMP_ONLY"|t }}</a></li>
<li><a data-clear-cache-type="purge" data-clear-cache="{{ uri.addNonce(clear_cache_url ~'/cleartype' ~ config.system.param_sep ~ 'purge', 'admin-form', 'admin-nonce') }}" href="#">{{ "PLUGIN_ADMIN.CACHE_PURGE"|t }}</a></li>
</ul>
</div>
{% endif %}
{% if authorize(['admin.maintenance', 'admin.super']) %}
<button data-gpm-checkupdates="" class="button"><i class="fa fa-refresh"></i> {{ "PLUGIN_ADMIN.CHECK_FOR_UPDATES"|tu }}</button>
<button data-gpm-checkupdates="" class="button"><i class="fa fa-refresh"></i> {{ "PLUGIN_ADMIN.CHECK_FOR_UPDATES"|t }}</button>
{% endif %}
</div>
<h1><i class="fa fa-fw fa-th"></i> {{ "PLUGIN_ADMIN.DASHBOARD"|tu }}</h1>
<h1><i class="fa fa-fw fa-th"></i> {{ "PLUGIN_ADMIN.DASHBOARD"|t }}</h1>
{% endblock %}
{% block widgets %}

View File

@@ -5,12 +5,12 @@
{% block content %}
<div class="admin-block">
<h1>
{{ "PLUGIN_ADMIN.ACCESS_DENIED"|tu }}
{{ "PLUGIN_ADMIN.ACCESS_DENIED"|t }}
</h1>
{% include 'partials/messages.html.twig' %}
<p>{{ admin.user.fullname }}, {{ "PLUGIN_ADMIN.ACCOUNT_NOT_ADMIN"|tu }}. <a href="{{ uri.addNonce(base_url_relative ~ '/task' ~ config.system.param_sep ~ 'logout', 'logout-form', 'logout-nonce') }}">{{ "PLUGIN_ADMIN.LOGOUT"|tu }}</a></p>
<p>{{ admin.user.fullname }}, {{ "PLUGIN_ADMIN.ACCOUNT_NOT_ADMIN"|t }}. <a href="{{ uri.addNonce(base_url_relative ~ '/task' ~ config.system.param_sep ~ 'logout', 'logout-form', 'logout-nonce') }}">{{ "PLUGIN_ADMIN.LOGOUT"|t }}</a></p>
</div>
{% endblock %}

View File

@@ -179,7 +179,7 @@
<table>
<tr>
<td align="center">
{{ 'PLUGIN_ADMIN.EMAIL_FOOTER'|tu|raw }}
{{ 'PLUGIN_ADMIN.EMAIL_FOOTER'|t|raw }}
</td>
</tr>
</table>

View File

@@ -1,7 +1,7 @@
{% extends 'partials/base.html.twig' %}
{% block titlebar %}
<h1><i class="fa fa-fw fa-exclamation-triangle"></i> {{ "PLUGIN_ADMIN.ERROR"|tu }}</h1>
<h1><i class="fa fa-fw fa-exclamation-triangle"></i> {{ "PLUGIN_ADMIN.ERROR"|t }}</h1>
{% endblock %}
{% block content %}

View File

@@ -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) %}
<div>
{% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
</div>
{% endif %}
{% endfor %}
{% embed 'forms/default/fields.html.twig' with {name: null, fields: form.fields} %}
{% block inner_markup_field_open %}<div>{% endblock %}
{% block inner_markup_field_close %}</div>{% endblock %}
{% endembed %}
<div class="form-actions primary-accent">
<button type="submit" class="button primary" name="task" value="forgot"><i class="fa fa-paper-plane"></i> {{ "PLUGIN_ADMIN.LOGIN_BTN_SEND_INSTRUCTIONS"|tu }}</button>
<button type="submit" class="button primary" name="task" value="forgot"><i class="fa fa-paper-plane"></i> {{ "PLUGIN_ADMIN.LOGIN_BTN_SEND_INSTRUCTIONS"|t }}</button>
</div>
{% endblock %}

View File

@@ -46,15 +46,15 @@
{% block label %}
{% if field.help %}
{% if field.markdown %}
<span class="hint--bottom" data-hint="{{ field.help|tu|markdown(false)|e('html') }}">{{ field.label|tu|markdown(false)|raw }}</span>
<span class="hint--bottom" data-hint="{{ field.help|t|markdown(false) }}">{{ field.label|t|markdown(false)|raw }}</span>
{% else %}
<span class="hint--bottom" data-hint="{{ field.help|tu|e('html') }}">{{ field.label|tu|raw }}</span>
<span class="hint--bottom" data-hint="{{ field.help|t }}">{{ field.label|t|raw }}</span>
{% 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] ? '<span class="required">*</span>' }}
@@ -63,9 +63,9 @@
{% if field.sublabel %}
<div class="form-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 %}
</div>
{% 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 @@
<div class="form-extra-wrapper {{ field.wrapper_classes }}">
<span class="form-description">
{% if field.markdown %}
{{ field.description|tu|markdown(false)|raw }}
{{ field.description|t|markdown(false)|raw }}
{% else %}
{{ field.description|tu|raw }}
{{ field.description|t|raw }}
{% endif %}
</span>
</div>

View File

@@ -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 @@
<div class="switch-toggle switch-grav medium switch-3">
<input type="radio" value="1" id="{{ field.name ~ '_' }}" name="{{ (scope ~ field.name)|fieldName ~ '[]' }}" class="label1" checked>
<label for="{{ field.name ~ '_' }}">{{ tu ? 'PLUGIN_ADMIN.ALLOWED'|tu : 'PLUGIN_ADMIN.ALLOWED'|t }}</label>
<label for="{{ field.name ~ '_' }}">{{ 'PLUGIN_ADMIN.ALLOWED'|t }}</label>
<input type="radio" value="0" id="{{ field.name ~ '_' }}" name="{{ (scope ~ field.name)|fieldName ~ '[]' }}" class="label0">
<label for="{{ field.name ~ '_' }}">{{ tu ? 'PLUGIN_ADMIN.DENIED'|tu : 'PLUGIN_ADMIN.DENIED'|t }}</label>
<label for="{{ field.name ~ '_' }}">{{ 'PLUGIN_ADMIN.DENIED'|t }}</label>
</div>
{% elseif field.data_type == 'permissions' %}
@@ -99,12 +98,12 @@
{% set rnd = random(100) %}
<input type="radio" value="1" id="{{ field.name ~ '_' ~ rnd }}" name="{{ (scope ~ field.name)|fieldName ~ '[' ~ key ~ ']' }}" class="label1" {{ access ? 'checked' }}>
<label for="{{ field.name ~ '_' ~ rnd }}">{{ tu ? 'PLUGIN_ADMIN.ALLOWED'|tu : 'PLUGIN_ADMIN.ALLOWED'|t }}</label>
<label for="{{ field.name ~ '_' ~ rnd }}">{{ 'PLUGIN_ADMIN.ALLOWED'|t }}</label>
{% set rnd = random(100) %}
<input type="radio" value="0" id="{{ field.name ~ '_' ~ rnd }}" name="{{ (scope ~ field.name)|fieldName ~ '[' ~ key ~ ']' }}" class="label0" {{ not access ? 'checked' }}>
<label for="{{ field.name ~ '_' ~ rnd }}">{{ tu ? 'PLUGIN_ADMIN.DENIED'|tu : 'PLUGIN_ADMIN.DENIED'|t }}</label>
<label for="{{ field.name ~ '_' ~ rnd }}">{{ 'PLUGIN_ADMIN.DENIED'|t }}</label>
</div>
{% elseif field.data_type == 'permissions' %}

View File

@@ -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' %}
<textarea
data-grav-array-type="value"
name="{{ ((scope ~ field.name)|fieldName) ~ '[' ~ key ~ ']' }}"
placeholder="{{ field.placeholder_value|e|tu }}"
placeholder="{{ field.placeholder_value|t }}"
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}>{{ text }}</textarea>
{% else %}
<input
data-grav-array-type="value"
type="text"
name="{{ ((scope ~ field.name)|fieldName) ~ '[' ~ key ~ ']' }}"
placeholder="{{ field.placeholder_value|e|tu }}"
placeholder="{{ field.placeholder_value|t }}"
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}
value={% if text == 'true' %}true{% elseif text == 'false' %}false{% else %}"{{ text|join(', ')|e }}"{% endif %} />
value={% if text == 'true' %}true{% elseif text == 'false' %}false{% else %}"{{ text|join(', ') }}"{% endif %} />
{% endif %}
<span data-grav-array-action="rem" class="fa fa-minus"></span>
@@ -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' %}
<textarea
data-grav-array-type="value"
name="{{ (scope ~ field.name)|fieldName }}"
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}
placeholder="{{ field.placeholder_value|e|tu }}"></textarea>
placeholder="{{ field.placeholder_value|t }}"></textarea>
{% else %}
<input
data-grav-array-type="value"
type="text"
name="{{ (scope ~ field.name)|fieldName }}"
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}
placeholder="{{ field.placeholder_value|e|tu }}" />
placeholder="{{ field.placeholder_value|t }}" />
{% endif %}
<span data-grav-array-action="rem" class="fa fa-minus"></span>
<span data-grav-array-action="add" class="fa fa-plus"></span>

View File

@@ -3,10 +3,10 @@
<thead>
<tr>
<th>#</th>
<th>{{ "PLUGIN_ADMIN.BACKUP_DATE"|tu }}</th>
<th>{{ "PLUGIN_ADMIN.NAME"|tu }}</th>
<th class="right pad">{{ "PLUGIN_ADMIN.SIZE"|tu }}</th>
<th class="right pad">{{ "PLUGIN_ADMIN.ACTION"|tu }}</th>
<th>{{ "PLUGIN_ADMIN.BACKUP_DATE"|t }}</th>
<th>{{ "PLUGIN_ADMIN.NAME"|t }}</th>
<th class="right pad">{{ "PLUGIN_ADMIN.SIZE"|t }}</th>
<th class="right pad">{{ "PLUGIN_ADMIN.ACTION"|t }}</th>
</tr>
</thead>
<tbody>
@@ -25,7 +25,7 @@
</tr>
{% else %}
<tr>
<td colspan="5" class="error" style="text-align: center;">{{ "PLUGIN_ADMIN.BACKUPS_NOT_GENERATED"|tu }}</td>
<td colspan="5" class="error" style="text-align: center;">{{ "PLUGIN_ADMIN.BACKUPS_NOT_GENERATED"|t }}</td>
</tr>
{% endfor %}
</tbody>

View File

@@ -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 %}
/>
<div class="g-colorpicker-preview-wrap">
<div class="g-colorpicker-preview" style="background-color: {{ value|e }}"></div>
<div class="g-colorpicker-preview" style="background-color: {{ value }}"></div>
</div>
</div>
</div>

View File

@@ -8,7 +8,7 @@
{% block input %}
<div class="colorbar-element-container g-colorpicker">
<div class="colorbar-element light-border" style="background-color: {{value}}">
<div class="colorbar-title">{{ field.help|e|tu }}</div>
<div class="colorbar-title">{{ field.help|t }}</div>
<input
data-grav-colorpicker="{{ {update: '.colorbar-element', offset: {x: -2, y: 20}} |json_encode|e('html_attr') }}"
@@ -19,8 +19,8 @@
{# input attribute structures #}
{% block input_attributes %}
{% if classes %}class="{{ 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 %}
@@ -28,8 +28,8 @@
{% if field.readonly in ['on', 'true', 1] %}readonly="readonly"{% 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 %}
/>
</div>

View File

@@ -5,12 +5,7 @@
{% block input %}
<div class="colorbar current-scheme">
{% 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} %}
</div>
{% endblock %}

View File

@@ -1,14 +1,8 @@
{% extends "forms/field.html.twig" %}
{% block field %}
{% if field.fields %}
<div class="form-column block pure-u-1-{{ cols }}">
{% 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 %}
</div>
{% endif %}
{% embed 'forms/default/fields.html.twig' with {name: field.name, fields: field.fields} %}
{% block outer_markup_field_open %}<div class="form-column block pure-u-1-{{ cols }}">{% endblock %}
{% block outer_markup_field_close %}</div>{% endblock %}
{% endembed %}
{% endblock %}

View File

@@ -2,11 +2,7 @@
{% block field %}
<div class="form-columns grid pure-g">
{% 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} %}
</div>
{% endblock %}
{% endblock %}

View File

@@ -17,7 +17,7 @@
{% if field.form %}form="{{ field.form }}"{% endif %}
>
{% for key, text in field.options %}
<option {% if key == value or text in value %}selected="selected"{% endif %} value="{{ field.multiple ? text : key }}">{{ key is empty ? text : "now"|date(key)|e }}</option>
<option {% if key == value or text in value %}selected="selected"{% endif %} value="{{ field.multiple ? text : key }}">{{ key is empty ? text : "now"|date(key) }}</option>
{% endfor %}
</select>
</div>

View File

@@ -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 %}
<div class="form-label form-field hint--bottom" {{ hint|raw }}>
{{ field.label|tu|raw }}
{{ field.label|t|raw }}
{{ field.validate.required in ['on', 'true', 1] ? '<span class="required">*</span>' }}
</div>
{% 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') }}</textarea>
>{{ input_value }}</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 %}
<div class="form-extra-wrapper {{ field.size }} {{ field.wrapper_classes }}">
<span class="form-description">
{% if field.markdown %}
{{ field.description|tu|markdown(false)|raw }}
{{ field.description|t|markdown(false)|raw }}
{% else %}
{{ field.description|tu|raw }}
{{ field.description|t|raw }}
{% endif %}
</span>
</div>

View File

@@ -9,16 +9,16 @@
<h2>
<label{% if field.collapsible %} for="fieldset_collapsible_{{ field.name }}" class="form-fieldset--cursor"{% endif %}>
{% if field.help %}
<span class="hint--bottom" data-hint="{{ field.help|e|tu }}">
<span class="hint--bottom" data-hint="{{ field.help|t }}">
{% endif %}
{% block label %}
{% if field.icon %}
<i class="fa fa-fw fa-{{ field.icon }}"></i>
{% endif %}
{{ field.title|tu }}
{{ field.title|t }}
{{ field.validate.required in ['on', 'true', 1] ? '<span class="required">*</span>' }}
{% if field.info %}
<span class="form-fieldset--info">{{ field.info|tu }}</span>
<span class="form-fieldset--info">{{ field.info|t }}</span>
{% 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 : ('<p>' ~ field.text|tu ~ '</p>')|raw }}
{% else %}
{{ field.markdown ? field.text|t|markdown : ('<p>' ~ field.t ~ '</p>')|raw }}
{% endif %}
{{ field.markdown ? field.text|t|markdown : ('<p>' ~ field.t ~ '</p>')|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 %}
</div>
{% endblock %}
</div>

View File

@@ -113,6 +113,6 @@
</div>
{% else %}
<span class="note">{{ "PLUGIN_ADMIN.CANNOT_ADD_FILES_PAGE_NOT_SAVED"|tu|raw }}</span>
<span class="note">{{ "PLUGIN_ADMIN.CANNOT_ADD_FILES_PAGE_NOT_SAVED"|t|raw }}</span>
{% endif %}
{% endblock %}

View File

@@ -2,7 +2,7 @@
{% set field = field|merge({'wrapper_classes': 'form-input-addon-wrapper'}) %}
{% block append %}
<div class="form-input-addon form-input-append hint--top" data-hint="{{ 'PLUGIN_ADMIN.AUTOREGENERATE_FOLDER_SLUG'|tu }}" data-regenerate='[name="{{ (scope ~ field.name)|fieldName }}"]'>
<div class="form-input-addon form-input-append hint--top" data-hint="{{ 'PLUGIN_ADMIN.AUTOREGENERATE_FOLDER_SLUG'|t }}" data-regenerate='[name="{{ (scope ~ field.name)|fieldName }}"]'>
<i class="fa fa-refresh"></i>
</div>
{% endblock %}

View File

@@ -22,8 +22,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 %}

View File

@@ -21,9 +21,9 @@
{% endif %}
<label{{ (field.toggleable ? ' class="toggleable" for="toggleable_' ~ field.name ~ '"')|raw }}>
{% if field.help %}
<span class="hint--bottom" data-hint="{{ field.help|e|tu }}">{{ field.label|tu }}</span>
<span class="hint--bottom" data-hint="{{ field.help|t }}">{{ field.label|t }}</span>
{% else %}
{{ field.label|tu }}
{{ field.label|t }}
{% endif %}
{{ field.validate.required in ['on', 'true', 1] ? '<span class="required">*</span>' }}
</label>
@@ -48,18 +48,18 @@
<div class="collection-actions">
{% if collapsible %}
<button class="button" type="button" data-action="expand_all"
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}><i class="fa fa-chevron-circle-down"></i> {{ "PLUGIN_ADMIN.EXPAND_ALL"|e|tu }}</button>
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}><i class="fa fa-chevron-circle-down"></i> {{ "PLUGIN_ADMIN.EXPAND_ALL"|t }}</button>
<button class="button" type="button" data-action="collapse_all"
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}><i class="fa fa-chevron-circle-right"></i> {{ "PLUGIN_ADMIN.COLLAPSE_ALL"|e|tu }}</button>
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}><i class="fa fa-chevron-circle-right"></i> {{ "PLUGIN_ADMIN.COLLAPSE_ALL"|t }}</button>
{% endif %}
{% if field.sortby %}
<button class="button{{ not value|length ? ' hidden' : '' }}" type="button" data-action="sort" data-action-sort="{{ field.sortby }}" data-action-sort-dir="{{ field.sortby_dir|default('asc') }}"
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}><i class="fa fa-sort-amount-{{ field.sortby_dir|default('asc') }}"></i> {{ btnSortLabel|e|tu }} '{{ field.sortby }}'</button>
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}><i class="fa fa-sort-amount-{{ field.sortby_dir|default('asc') }}"></i> {{ btnSortLabel|t }} '{{ field.sortby }}'</button>
{% endif %}
<button class="button" type="button" data-action="add"
data-action-add="{{ field.placement is same as('position') ? 'top' : field.placement|default('bottom') }}"
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}
><i class="fa fa-plus"></i> {{ btnLabel|e|tu }}</button>
><i class="fa fa-plus"></i> {{ btnLabel|t }}</button>
</div>
{% endif %}
<ul {% if field.classes is defined %}class="{{ field.classes }}"{% endif %} data-collection-holder="{{ name }}"
@@ -69,138 +69,107 @@
{% if field.fields %}
{% set collapsible = field.fields|length > 1 and (field.collapsible is not defined or field.collapsible) %}
{% for key, val in value %}
{% set itemName = name ? name ~ '.' ~ key : key %}
<li data-collection-item="{{ itemName }}"
{% set item_name = name ? name ~ '.' ~ key : key %}
<li data-collection-item="{{ item_name }}"
data-collection-key="{{ key }}"
class="{{ collapsible and field.collapsed ? 'collection-collapsed' : '' }}"
{% if field.min_height %}style="min-height:{{ field.min_height }};"{% endif %}>
<div class="collection-sort"><i class="fa fa-fw fa-bars"></i></div>
{% for childName, child in field.fields %}
{% set child = child|merge({ '_list_index': itemName }) %}
{%- if childName == 'value' -%}
{% set childKey = '' %}
{% set childValue = val %}
{% set childName = itemName -%}
{%- elseif childName starts with '.' -%}
{% set childKey = childName|trim('.') %}
{% set childValue = val|nested(childName) %}
{% set childName = itemName ~ 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, item_name) %}
{% if child %}
{% set child = child|merge({ '_list_index': item_name }) %}
{% set default_layout = 'text' %}
{% if child.type == 'key' or (child.key == true and child.type != 'list') %}
{# 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: item_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 and child.type != 'list' %}
{% 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 = childValue %}
{% set templateData = { field: child, value: childValue } %}
{% set field_templates = include_form_field(child.type, field_layout, default_layout) %}
{% set template_data = { field: child, value: child_value } %}
{% if default_layout != 'key' %}
{% set originalValue = child_value %}
{% if child.type == 'fieldset' %}
{% set template_data = template_data|merge({val: child_value}) %}
{% endif %}
{% endif %}
{% if child.type == 'fieldset' %}
{% set templateData = templateData|merge({val: childValue}) %}
{%- include field_templates with template_data -%}
{% endif %}
{%
include [
"forms/fields/#{child.type}/#{child.type}.html.twig",
'forms/fields/text/text.html.twig'
] with templateData
%}
{% endif %}
{% endfor %}
<div class="item-actions">
{% if collapsible %}
<i class="fa fa-chevron-circle-{{ field.collapsed ? 'right' : 'down' }}" data-action="{{ field.collapsed ? 'expand' : 'collapse' }}"></i>
<br />
{% endif %}
<i class="fa fa-trash-o" data-action="delete"></i>
</div>
</li>
{% endfor %}
{% endfor %}
<div class="item-actions">
{% if collapsible %}
<i class="fa fa-chevron-circle-{{ field.collapsed ? 'right' : 'down' }}" data-action="{{ field.collapsed ? 'expand' : 'collapse' }}"></i>
<br />
{% endif %}
<i class="fa fa-trash-o" data-action="delete"></i>
</div>
</li>
{% endfor %}
{% endif %}
</ul>
{% if fieldControls in ['bottom', 'both'] %}
<div class="collection-actions">
{% if collapsible %}
<button class="button" type="button" data-action="expand_all"
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}><i class="fa fa-chevron-circle-down"></i> {{ "PLUGIN_ADMIN.EXPAND_ALL"|e|tu }}</button>
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}><i class="fa fa-chevron-circle-down"></i> {{ "PLUGIN_ADMIN.EXPAND_ALL"|t }}</button>
<button class="button" type="button" data-action="collapse_all"
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}><i class="fa fa-chevron-circle-right"></i> {{ "PLUGIN_ADMIN.COLLAPSE_ALL"|e|tu }}</button>
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}><i class="fa fa-chevron-circle-right"></i> {{ "PLUGIN_ADMIN.COLLAPSE_ALL"|t }}</button>
{% endif %}
{% if field.sortby %}
<button class="button{{ not value|length ? ' hidden' : '' }}" type="button" data-action="sort" data-action-sort="{{ field.sortby }}" data-action-sort-dir="{{ field.sortby_dir|default('asc') }}"
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}><i class="fa fa-sort-amount-{{ field.sortby_dir|default('asc') }}"></i> {{ btnSortLabel|e|tu }} '{{ field.sortby }}'</button>
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}><i class="fa fa-sort-amount-{{ field.sortby_dir|default('asc') }}"></i> {{ btnSortLabel|t }} '{{ field.sortby }}'</button>
{% endif %}
<button class="button" type="button" data-action="add"
data-action-add="{{ field.placement is same as('position') ? 'bottom' : field.placement|default('bottom') }}"
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}
><i class="fa fa-plus"></i> {{ btnLabel|e|tu }}</button>
><i class="fa fa-plus"></i> {{ btnLabel|t }}</button>
</div>
{% endif %}
{%- set itemName = name ? name ~ '.*' : '*' -%}
<div style="display: none;" data-collection-template="new" data-collection-template-html="{%- filter replace({' ': ' ', '\n': ' '})|e('html_attr') -%}
<li data-collection-item="{{ itemName }}">
{% set template %}
{%- set item_name = name ? name ~ '.*' : '*' -%}
<li data-collection-item="{{ item_name }}">
{% if field.sort is not same as(false) %}
<div class="collection-sort"><i class="fa fa-fw fa-bars"></i></div>
<div class="collection-sort"><i class="fa fa-fw fa-bars"></i></div>
{% endif %}
{%- if field.fields -%}
{%- 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 }) -%}
{%- for child_name, child in field.fields -%}
{% set child = prepare_form_field(child, child_name, item_name) %}
{% if child %}
{% set child = child|merge({ '_list_index': item_name }) %}
{% set default_layout = 'text' %}
{% if child.type == 'key' or child.key == true %}
{# Special handling for the key field #}
{% set default_layout = 'key' %}
{% elseif child.name == 'value' %}
{# Special handling for the value field #}
{% set child = child|merge({ name: item_name }) %}
{% endif %}
{%- if child.type == 'key' -%}
{%-
include 'forms/fields/key/key.html.twig'
with { field: child, value: null }
-%}
{%- elseif child.key == true -%}
{%-
include [
"forms/fields/#{child.type}/#{child.type}.html.twig",
'forms/fields/key/key.html.twig'
] with { field: child, value: null }
-%}
{%- elseif child.type -%}
{%-
include [
"forms/fields/#{child.type}/#{child.type}.html.twig",
'forms/fields/text/text.html.twig'
] with { field: child, value: null }
-%}
{%- endif -%}
{%- endfor %}
<div class="item-actions">
{% if collapsible %}
<i class="fa fa-chevron-circle-down" data-action="collapse"></i>
<br />
{% endif %}
<i class="fa fa-trash-o" data-action="delete"></i>
</div>
{% set field_templates = include_form_field(child.type, field_layout, default_layout) %}
{% include field_templates with { field: child, value: null } %}
{% endif %}
{%- endfor %}
<div class="item-actions">
{% if collapsible %}
<i class="fa fa-chevron-circle-down" data-action="collapse"></i>
<br />
{% endif %}
<i class="fa fa-trash-o" data-action="delete"></i>
</div>
{%- endif -%}
</li>
{%- endfilter -%}"></div>
{% endset %}
<div style="display: none;" data-collection-template="new"
data-collection-template-html="{{ template|regex_replace('/([ \r\n]+)/', ' ')|e('html_attr') }}"></div>
<div style="display: none;" data-collection-config="{{ name }}"></div>
</div>
</div>

View File

@@ -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 }}" />
<span class="fa fa-minus js__remove-item"></span>
@@ -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 %}

View File

@@ -19,9 +19,9 @@
<div class="form-label{% if not vertical %} block size-1-3 pure-u-1-3{% endif %}">
<label>
{% if field.help %}
<span class="tooltip" data-asTooltip-position="w" title="{{ field.help|e|tu }}">{{ field.label|tu }}</span>
<span class="tooltip" data-asTooltip-position="w" title="{{ field.help|t }}">{{ field.label|t }}</span>
{% else %}
{{ field.label|tu }}
{{ field.label|t }}
{% endif %}
{{ field.validate.required in ['on', 'true', 1] ? '<span class="required">*</span>' }}
</label>
@@ -36,7 +36,7 @@
name="{{ (scope ~ field.name)|fieldName }}"
value="" />
{% if not canOrder %}
<div class="notice">{{ "PLUGIN_ADMIN.ORDERING_DISABLED_BECAUSE_PAGE_NO_PREFIX"|tu|raw }}</div>
<div class="notice">{{ "PLUGIN_ADMIN.ORDERING_DISABLED_BECAUSE_PAGE_NO_PREFIX"|t|raw }}</div>
{% endif %}
{% if siblings|length < 200 %}
@@ -48,7 +48,7 @@
{% endfor %}
</ul>
{% if sortable_count < siblings|length %}
<label>{{ "PLUGIN_ADMIN.UNSORTABLE_PAGES"|tu }}</label>
<label>{{ "PLUGIN_ADMIN.UNSORTABLE_PAGES"|t }}</label>
<ul class="orderable disabled">
{% for page in siblings if not page.order %}
<li {{ page.slug == data.slug ? 'data-active-id' : ''}}>{{ page.title ?: 'NEW' }} <a href="{{ getPageUrl(page) }}"><i class="fa fa-external-link"></i></a></li>
@@ -56,7 +56,7 @@
</ul>
{% endif %}
{% else %}
<div class="notice">{{ "PLUGIN_ADMIN.ORDERING_DISABLED_BECAUSE_TOO_MANY_SIBLINGS"|tu }}</div>
<div class="notice">{{ "PLUGIN_ADMIN.ORDERING_DISABLED_BECAUSE_TOO_MANY_SIBLINGS"|t }}</div>
{% endif %}
</div>
</div>

View File

@@ -29,7 +29,7 @@
<div class="form-field grid vertical {% if field.classes is defined %}{{ field.classes }}{% endif %}">
<div class="form-label">
<label>{{ field.label|tu }}</label>
<label>{{ field.label|t }}</label>
</div>
<div class="form-data form-uploads-wrapper">
<div id="grav-dropzone"
@@ -42,7 +42,7 @@
data-dropzone-field="{{ (scope ~ field.name)|fieldName }}"></div>
{% if admin.session.expert == '0' or not user.authorize('admin.super') %}
<input type="hidden" name="{{ (scope ~ field.name)|fieldName }}" value="{{ value|e }}" />
<input type="hidden" name="{{ (scope ~ field.name)|fieldName }}" value="{{ value }}" />
{% endif %}
</div>
</div>
@@ -50,7 +50,7 @@
<div class="form-tab">
<div class="form-field">
<div class="form-label">
{{ "PLUGIN_ADMIN.CANNOT_ADD_MEDIA_FILES_PAGE_NOT_SAVED"|tu }}
{{ "PLUGIN_ADMIN.CANNOT_ADD_MEDIA_FILES_PAGE_NOT_SAVED"|t }}
</div>
</div>
</div>

View File

@@ -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 %}
<div class="permission-container {{ data.action_class }}">
<div class="permission-name">
<span>{{ tu ? data.action_label|tu :data.action_label|t }}</span>
<span>{{ data.action_label|t }}</span>
{% 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 %}
<input type="radio"
value="{{ key }}"
@@ -124,12 +123,11 @@
{% set options = { '1': 'PLUGIN_ADMIN.ALLOWED', '0': 'PLUGIN_ADMIN.DENIED', '': 'PLUGIN_ADMIN.NOT_SET' } %}
{% set maxLen = 0 %}
{% for text in options %}
{% set maxLen = max((tu ? text|tu : text|t)|trim|length, maxLen) %}
{% set maxLen = max(text|t|trim|length, maxLen) %}
{% endfor %}
{% set permissions = grav.permissions %}
{% set access = permissions.access(value) %}
{% set tu = grav.twig.twig.filters['tu'] is defined %}
{% if object and field.check_authorize %}
{% set auth_badges = true %}
{% set super = object.authorize('admin.super', 'test') %}

View File

@@ -4,23 +4,21 @@
{% if field.security is empty or authorize(array(field.security)) %}
{% if field.title or field.underline %}
<h1 class="{{ field.classes }} {{ field.underline ?: 'no_underline' }}">{% if grav.twig.twig.filters['tu'] is defined %}{{ field.title|tu }}{% else %}{{ field.title|t }}{% endif %}</h1>
<h1 class="{{ field.classes }} {{ field.underline ?: 'no_underline' }}">{{ field.title|t }}</h1>
{% endif %}
{% if field.text %}
<p>{% if grav.twig.twig.filters['tu'] is defined %}{{ field.text|tu|markdown|raw }}{% else %}{{ field.text|t|markdown|raw }}{% endif %}</p>
<p>{{ field.text|t|markdown|raw }}</p>
{% endif %}
{% if field.fields %}
<div class="form-section {{ field.field_classes }} {{ field.outer_classes }}">
{% 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 %}
</div>
{% endif %}
{% embed 'forms/default/fields.html.twig' with {name: field.name, fields: field.fields} %}
{% block outer_markup_field_open %}
<div class="form-section {{ field.field_classes }} {{ field.outer_classes }}">
{% endblock %}
{% block outer_markup_field_close %}
</div>
{% endblock %}
{% endembed %}
{% endif %}
{% endblock %}

View File

@@ -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 %}<option value="" disabled selected>{% if grav.twig.twig.filters['tu'] is defined %}{{ field.placeholder|tu|raw }}{% else %}{{ field.placeholder|t|raw }}{% endif %}</option>{% endif %}
{% if field.placeholder %}<option value="" disabled selected>{{ field.placeholder|t|raw }}</option>{% endif %}
{% if value is defined %}
<option selected="selected" value="{{ value }}">{{ value }}</option>

View File

@@ -33,6 +33,6 @@
}
} %}
{% include ['forms/fields/select/select.html.twig'] %}
{% include 'forms/fields/select/select.html.twig' %}
{% endfor %}
{% endblock %}

View File

@@ -70,7 +70,7 @@
</style>
<div class="pid-{{ id }} admin-preview-wrapper" data-preset-values="{{ preset|json_encode|e('html_attr') }}">
<div class="admin-preview form-border">
<div class="ap-overlay"><b><i class="fa fa-upload"></i> {{ "PLUGIN_ADMIN.LOAD_PRESET"|tu|e }}</b></div>
<div class="ap-overlay"><b><i class="fa fa-upload"></i> {{ "PLUGIN_ADMIN.LOAD_PRESET"|t }}</b></div>
<div class="ap-sidebar">
<div class="ap-logo"></div>
<div class="ap-nav">
@@ -95,7 +95,7 @@
</div>
</div>
<div class="admin-preview-title">
{{ preset.name|e }}
{{ preset.name }}
</div>
<input type="hidden" value="{{ preset|json_encode }}" />
</div>

View File

@@ -34,13 +34,13 @@
{% set maxLen = 0 %}
{% for value, text in options %}
{% set translation = grav.twig.twig.filters['tu'] is defined ? text|tu : text|t %}
{% set translation = text|t %}
{% set maxLen = max(translation|length, maxLen) %}
{% endfor %}
{% for key, text in options %}
{% set id = "toggle_" ~ field.name ~ "." ~ widget_id ~ '.' ~ key %}
{% set translation = (grav.twig.twig.filters['tu'] is defined ? text|tu : text|t)|trim %}
{% set translation = text|t|trim %}
<input type="radio"
value="{{ key }}"

View File

@@ -2,5 +2,5 @@
{% set xss_content = data.value('content') %}
{% set xss_status = xss({header: xss_header, content: xss_content}) %}
{% if xss_status is not empty %}
<div class="notice alert">{{ "PLUGIN_ADMIN.XSS_ISSUE"|tu([xss_status])|raw }}</div>
<div class="notice alert">{{ "PLUGIN_ADMIN.XSS_ISSUE"|t(xss_status)|raw }}</div>
{% endif %}

View File

@@ -4,7 +4,7 @@
{% block content %}
<div class="admin-block">
<h1>
{{ "PLUGIN_ADMIN.INSTALLER"|tu }}
{{ "PLUGIN_ADMIN.INSTALLER"|t }}
</h1>
{% include 'partials/messages.html.twig' %}

View File

@@ -26,11 +26,11 @@
{% endif %}
{% for p in pcol %}
{% set description = (not p.page ? "PLUGIN_ADMIN.FOLDER"|tu ~ ' &bull; ' : "PLUGIN_ADMIN.PAGE"|tu ~ ' &bull; ') ~
(p.isModule ? "PLUGIN_ADMIN.MODULE"|tu ~ ' &bull; ' : '') ~
(p.routable ? "PLUGIN_ADMIN.ROUTABLE"|tu ~ ' &bull; ' : "PLUGIN_ADMIN.NON_ROUTABLE"|tu ~ ' &bull; ') ~
(p.visible ? "PLUGIN_ADMIN.VISIBLE"|tu ~ ' &bull; ' : "PLUGIN_ADMIN.NON_VISIBLE"|tu ~ ' &bull; ') ~
(p.published ? "PLUGIN_ADMIN.PUBLISHED"|tu ~ ' &bull; ' : "PLUGIN_ADMIN.NON_PUBLISHED"|tu ~ ' &bull; ') %}
{% set description = (not p.page ? "PLUGIN_ADMIN.FOLDER"|t ~ ' &bull; ' : "PLUGIN_ADMIN.PAGE"|t ~ ' &bull; ') ~
(p.isModule ? "PLUGIN_ADMIN.MODULE"|t ~ ' &bull; ' : '') ~
(p.routable ? "PLUGIN_ADMIN.ROUTABLE"|t ~ ' &bull; ' : "PLUGIN_ADMIN.NON_ROUTABLE"|t ~ ' &bull; ') ~
(p.visible ? "PLUGIN_ADMIN.VISIBLE"|t ~ ' &bull; ' : "PLUGIN_ADMIN.NON_VISIBLE"|t ~ ' &bull; ') ~
(p.published ? "PLUGIN_ADMIN.PUBLISHED"|t ~ ' &bull; ' : "PLUGIN_ADMIN.NON_PUBLISHED"|t ~ ' &bull; ') %}
{% set page_url = getPageUrl(p) %}
@@ -43,7 +43,7 @@
<div class="page-item__content-name">
<span data-hint="{{ description|trim(' &bull; ')|raw }}" class="hint--top page-item__content-hint">
{% set page_label = attribute(p.header, display_field)|defined(attribute(p, display_field))|defined(p.title)|default(p.slug|titleize) %}
<a href="{{ page_url }}" class="page-edit">{{ page_label|e }}</a>
<a href="{{ page_url }}" class="page-edit">{{ page_label }}</a>
</span>
{% if p.language %}
<span class="badge lang {% if p.language == admin.language %}info{% endif %}">{{p.language}}</span>
@@ -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 ? '<a class="page-view" target="' ~ preview_target ~ '" href="' ~ preview_route ~ '" title="' ~ "PLUGIN_ADMIN.PREVIEW"|tu ~ '"> <i class="fa fa-fw fa-eye"></i></a>' : '' %}
{% set preview_link = p.routable ? '<a class="page-view" target="' ~ preview_target ~ '" href="' ~ preview_route ~ '" title="' ~ "PLUGIN_ADMIN.PREVIEW"|t ~ '"> <i class="fa fa-fw fa-eye"></i></a>' : '' %}
{% else %}
{% set preview_route = admin_route('/preview' ~ (p.home ? '' : p.route)) %}
{% set preview_link = p.routable ? '<a class="page-view" href="' ~ preview_route ~ '" title="' ~ "PLUGIN_ADMIN.PREVIEW"|tu ~ '"> <i class="fa fa-fw fa-eye"></i></a>' : '' %}
{% set preview_link = p.routable ? '<a class="page-view" href="' ~ preview_route ~ '" title="' ~ "PLUGIN_ADMIN.PREVIEW"|t ~ '"> <i class="fa fa-fw fa-eye"></i></a>' : '' %}
{% 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 ? '<a class="button" target="' ~ preview_target ~ '" href="' ~ preview_route ~ '" title="' ~ "PLUGIN_ADMIN.PREVIEW"|tu ~ '"> <i class="fa fa-fw fa-eye" style="font-size:18px;margin-right:0;"></i></a>' : '' %}
{% set preview_link = context.routable ? '<a class="button" target="' ~ preview_target ~ '" href="' ~ preview_route ~ '" title="' ~ "PLUGIN_ADMIN.PREVIEW"|t ~ '"> <i class="fa fa-fw fa-eye" style="font-size:18px;margin-right:0;"></i></a>' : '' %}
{% else %}
{% set preview_route = admin_route('/preview' ~ (context.home ? '' : context.route)) %}
{% set preview_link = context.routable ? '<a class="button" href="' ~ preview_route ~ '" title="' ~ "PLUGIN_ADMIN.PREVIEW"|tu ~ '"> <i class="fa fa-fw fa-eye" style="font-size:18px;margin-right:0;"></i></a>' : '' %}
{% set preview_link = context.routable ? '<a class="button" href="' ~ preview_route ~ '" title="' ~ "PLUGIN_ADMIN.PREVIEW"|t ~ '"> <i class="fa fa-fw fa-eye" style="font-size:18px;margin-right:0;"></i></a>' : '' %}
{% endif %}
{% block titlebar %}
<div class="button-bar">
{% if mode == 'list' %}
<a class="button" href="{{ admin_route('/') }}"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|tu }}</a>
<a class="button" href="{{ admin_route('/') }}"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|t }}</a>
{% for key, add_modal in config.plugins.admin.add_modals %}
{% if add_modal.show_in|defined('bar') == 'bar' %}
<a class="button {{ add_modal.link_classes }}" href="#modal-add_modal-{{ key }}" data-remodal-target="modal-add_modal-{{ key }}"><i class="fa fa-plus"></i> {{ add_modal.label|tu }}</a>
<a class="button {{ add_modal.link_classes }}" href="#modal-add_modal-{{ key }}" data-remodal-target="modal-add_modal-{{ key }}"><i class="fa fa-plus"></i> {{ add_modal.label|t }}</a>
{% endif %}
{% endfor %}
<div class="button-group">
<button type="button" class="button disabled" href="#modal" data-remodal-target="modal">
<i class="fa fa-plus"></i> {{ "PLUGIN_ADMIN.ADD"|tu }}
<i class="fa fa-plus"></i> {{ "PLUGIN_ADMIN.ADD"|t }}
</button>
<button type="button" class="button dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-caret-down"></i>
</button>
<ul class="dropdown-menu">
<li><a class="button" href="#modal" data-remodal-target="modal">{{ "PLUGIN_ADMIN.ADD_PAGE"|tu }}</a></li>
<li><a class="button" href="#modal-folder" data-remodal-target="modal-folder">{{ "PLUGIN_ADMIN.ADD_FOLDER"|tu }}</a></li>
<li><a class="button" href="#modal" data-remodal-target="modal">{{ "PLUGIN_ADMIN.ADD_PAGE"|t }}</a></li>
<li><a class="button" href="#modal-folder" data-remodal-target="modal-folder">{{ "PLUGIN_ADMIN.ADD_FOLDER"|t }}</a></li>
{% if admin.modularTypes is not empty %}
<li><a class="button" href="#module" data-remodal-target="module">{{ "PLUGIN_ADMIN.ADD_MODULE"|tu }}</a></li>
<li><a class="button" href="#module" data-remodal-target="module">{{ "PLUGIN_ADMIN.ADD_MODULE"|t }}</a></li>
{% endif %}
{% for key, add_modal in config.plugins.admin.add_modals %}
{% if add_modal.show_in|defined('bar') == 'dropdown' %}
<li><a class="button {{ add_modal.link_classes }}" href="#modal-add_modal-{{ key }}" data-remodal-target="modal-add_modal-{{ key }}">{{ add_modal.label|tu }}</a></li>
<li><a class="button {{ add_modal.link_classes }}" href="#modal-add_modal-{{ key }}" data-remodal-target="modal-add_modal-{{ key }}">{{ add_modal.label|t }}</a></li>
{% endif %}
{% endfor %}
</ul>
@@ -196,7 +196,7 @@
{{ preview_link|raw }}
<a class="button" href="{{ admin_route('/pages') }}" title="{{ "PLUGIN_ADMIN.BACK"|tu }}"><i class="fa fa-reply"></i></a>
<a class="button" href="{{ admin_route('/pages') }}" title="{{ "PLUGIN_ADMIN.BACK"|t }}"><i class="fa fa-reply"></i></a>
{% if exists %}
{% set siblings = context.parent().children() %}
@@ -204,47 +204,47 @@
{% if not siblings.isFirst(context.path) %}
{% set sib = siblings.nextSibling(context.path) %}
{% set sib_url = admin_route('/pages' ~ (sib.header.routes.default ?: sib.rawRoute)) %}
<a class="button hidden-mobile" href="{{ sib_url }}" title="{{ "PLUGIN_ADMIN.PREVIOUS"|tu }}"><i class="fa fa-chevron-left"></i></a>
<a class="button hidden-mobile" href="{{ sib_url }}" title="{{ "PLUGIN_ADMIN.PREVIOUS"|t }}"><i class="fa fa-chevron-left"></i></a>
{% endif %}
{% if not siblings.isLast(context.path) %}
{% set sib = siblings.prevSibling(context.path) %}
{% set sib_url = admin_route('/pages' ~ (sib.header.routes.default ?: sib.rawRoute)) %}
<a class="button hidden-mobile" href="{{ sib_url }}" title="{{ "PLUGIN_ADMIN.NEXT"|tu }}"><i class="fa fa-chevron-right"></i></a>
<a class="button hidden-mobile" href="{{ sib_url }}" title="{{ "PLUGIN_ADMIN.NEXT"|t }}"><i class="fa fa-chevron-right"></i></a>
{% endif %}
{% if warn %}
<a class="button" href="#delete" data-remodal-target="delete" data-delete-url="{{ uri.addNonce(page_url ~ '/task' ~ config.system.param_sep ~ 'delete', 'admin-form', 'admin-nonce') }}"><i class="fa fa-trash-o"></i> {{ "PLUGIN_ADMIN.DELETE"|tu }}</a>
<a class="button" href="#delete" data-remodal-target="delete" data-delete-url="{{ uri.addNonce(page_url ~ '/task' ~ config.system.param_sep ~ 'delete', 'admin-form', 'admin-nonce') }}"><i class="fa fa-trash-o"></i> {{ "PLUGIN_ADMIN.DELETE"|t }}</a>
{% else %}
<a class="button disable-after-click" href="{{ uri.addNonce(uri.route(true) ~ '/task' ~ config.system.param_sep ~ 'delete', 'admin-form', 'admin-nonce') }}" class="page-delete" ><i class="fa fa-trash-o"></i></a>
{% endif %}
<div class="button-group">
<button type="button" class="button disabled" href="#modal" data-remodal-target="modal">
<i class="fa fa-plus"></i> {{ "PLUGIN_ADMIN.ADD"|tu }}
<i class="fa fa-plus"></i> {{ "PLUGIN_ADMIN.ADD"|t }}
</button>
<button type="button" class="button dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-caret-down"></i>
</button>
<ul class="dropdown-menu">
<li><a class="button" href="#modal" data-remodal-target="modal">{{ "PLUGIN_ADMIN.ADD_PAGE"|tu }}</a></li>
<li><a class="button" href="#modal-folder" data-remodal-target="modal-folder">{{ "PLUGIN_ADMIN.ADD_FOLDER"|tu }}</a></li>
<li><a class="button" href="#modal" data-remodal-target="modal">{{ "PLUGIN_ADMIN.ADD_PAGE"|t }}</a></li>
<li><a class="button" href="#modal-folder" data-remodal-target="modal-folder">{{ "PLUGIN_ADMIN.ADD_FOLDER"|t }}</a></li>
{% if admin.modularTypes is not empty %}
<li><a class="button" href="#module" data-remodal-target="module">{{ "PLUGIN_ADMIN.ADD_MODULE"|tu }}</a></li>
<li><a class="button" href="#module" data-remodal-target="module">{{ "PLUGIN_ADMIN.ADD_MODULE"|t }}</a></li>
{% endif %}
</ul>
</div>
<a class="button disable-after-click" href="{{ uri.addNonce(page_url ~ '/task' ~ config.system.param_sep ~ 'copy', 'admin-form', 'admin-nonce') }}" class="page-copy" ><i class="fa fa-copy"></i> {{ "PLUGIN_ADMIN.COPY"|tu }}</a>
<a class="button" href="#" data-remodal-target="move" data-parents="data[route]"><i class="fa fa-arrows"></i> {{ "PLUGIN_ADMIN.MOVE"|tu }}</a>
<a class="button disable-after-click" href="{{ uri.addNonce(page_url ~ '/task' ~ config.system.param_sep ~ 'copy', 'admin-form', 'admin-nonce') }}" class="page-copy" ><i class="fa fa-copy"></i> {{ "PLUGIN_ADMIN.COPY"|t }}</a>
<a class="button" href="#" data-remodal-target="move" data-parents="data[route]"><i class="fa fa-arrows"></i> {{ "PLUGIN_ADMIN.MOVE"|t }}</a>
{% if config.plugins['admin-pro'].enabled %}
<a class="button" href="#" data-remodal-target="revisions"><i class="fa fa-history"></i> {{ "PLUGIN_ADMIN_PRO.REVISIONS"|tu }}</a>
<a class="button" href="#" data-remodal-target="revisions"><i class="fa fa-history"></i> {{ "PLUGIN_ADMIN_PRO.REVISIONS"|t }}</a>
{% endif %}
{% endif %}
<div class="button-group">
<button class="button success" name="task" value="save" form="blueprints" type="submit"><i class="fa fa-check"></i> {{ "PLUGIN_ADMIN.SAVE"|tu }}</button>
<button class="button success" name="task" value="save" form="blueprints" type="submit"><i class="fa fa-check"></i> {{ "PLUGIN_ADMIN.SAVE"|t }}</button>
{% if exists and admin.multilang %}
{% set untranslated = context.untranslatedLanguages(true) %}
{% if untranslated %}
@@ -255,7 +255,7 @@
{% for langCode in untranslated %}
{% set langName = admin.siteLanguages[langCode] %}
{% if langCode != page_lang %}
<li><button class="button success task" name="task" value="saveas" lang="{{langCode}}" form="blueprints" type="submit">{{ "PLUGIN_ADMIN.SAVE_AS"|tu }} {{ langName[:1]|upper ~ langName[1:] }}</button></li>
<li><button class="button success task" name="task" value="saveas" lang="{{langCode}}" form="blueprints" type="submit">{{ "PLUGIN_ADMIN.SAVE_AS"|t }} {{ langName[:1]|upper ~ langName[1:] }}</button></li>
{% endif %}
{% endfor %}
</ul>
@@ -267,13 +267,13 @@
{% endif %}
</div>
{% if mode == 'new' %}
<h1><i class="fa fa-fw fa-file-text-o"></i> {{ "PLUGIN_ADMIN.ADD_PAGE"|tu }}</h1>
<h1><i class="fa fa-fw fa-file-text-o"></i> {{ "PLUGIN_ADMIN.ADD_PAGE"|t }}</h1>
{% elseif mode == 'edit' %}
<h1><i class="fa fa-fw fa-file-text-o"></i>
{{ context.title }}
</h1>
{% else %}
<h1><i class="fa fa-fw fa-file-text-o"></i> {{ "PLUGIN_ADMIN.MANAGE_PAGES"|tu }}</h1>
<h1><i class="fa fa-fw fa-file-text-o"></i> {{ "PLUGIN_ADMIN.MANAGE_PAGES"|t }}</h1>
{% endif %}
{% endblock %}
@@ -290,7 +290,7 @@
<div id="admin-lang-toggle" class="button-group">
<button type="button" class="button disabled">
{% if exists %}
{{ page_lang ?? "PLUGIN_ADMIN.DEFAULT"|tu }}
{{ page_lang ?? "PLUGIN_ADMIN.DEFAULT"|t }}
{% else %}
{{ admin.language }}
{% endif %}
@@ -315,8 +315,8 @@
{% endif %}
{% if context.blueprints.fields and user.authorize('admin.super') %}
{% set normalText = "PLUGIN_ADMIN.NORMAL"|tu %}
{% set expertText = "PLUGIN_ADMIN.EXPERT"|tu %}
{% set normalText = "PLUGIN_ADMIN.NORMAL"|t %}
{% set expertText = "PLUGIN_ADMIN.EXPERT"|t %}
{% set maxLen = max([normalText|length, expertText|length]) %}
{% set normalText = macro.spanToggle(normalText, maxLen) %}
{% set expertText = macro.spanToggle(expertText, maxLen) %}
@@ -347,14 +347,14 @@
{% else %}
<form id="page-filtering">
<div class="page-filters">
<input type="text" data-filter-labels="{{ [{'id': 'mode', 'name': 'PLUGIN_ADMIN.PAGE_MODES'|tu}, {'id': 'type', 'name': 'PLUGIN_ADMIN.PAGE_TYPES'|tu}, {'id': 'access', 'name': 'PLUGIN_ADMIN.ACCESS_LEVELS'|tu}] |json_encode|e('html_attr')}}" data-filter-types="{{ admin.types|merge(admin.modularTypes)|json_encode|e('html_attr') }}" data-filter-access-levels="{{ admin.accessLevels|json_encode|e('html_attr') }}" placeholder="{{ "PLUGIN_ADMIN.ADD_FILTERS"|tu }}" class="page-filter" name="page-filter" />
<input type="text" data-filter-labels="{{ [{'id': 'mode', 'name': 'PLUGIN_ADMIN.PAGE_MODES'|t}, {'id': 'type', 'name': 'PLUGIN_ADMIN.PAGE_TYPES'|t}, {'id': 'access', 'name': 'PLUGIN_ADMIN.ACCESS_LEVELS'|t}] |json_encode|e('html_attr')}}" data-filter-types="{{ admin.types|merge(admin.modularTypes)|json_encode|e('html_attr') }}" data-filter-access-levels="{{ admin.accessLevels|json_encode|e('html_attr') }}" placeholder="{{ "PLUGIN_ADMIN.ADD_FILTERS"|t }}" class="page-filter" name="page-filter" />
</div>
<div class="page-search">
<input type="text" placeholder="{{ "PLUGIN_ADMIN.SEARCH_PAGES"|tu }}" name="page-search" />
<input type="text" placeholder="{{ "PLUGIN_ADMIN.SEARCH_PAGES"|t }}" name="page-search" />
</div>
<div class="page-shortcuts">
<span class="button button-x-small" data-page-toggleall="expand"><i class="fa fa-fw fa-plus-circle"></i> {{ "PLUGIN_ADMIN.EXPAND_ALL"|tu }}</span>
<span class="button button-x-small" data-page-toggleall="collapse"><i class="fa fa-fw fa-minus-circle"></i> {{ "PLUGIN_ADMIN.COLLAPSE_ALL"|tu }}</span>
<span class="button button-x-small" data-page-toggleall="expand"><i class="fa fa-fw fa-plus-circle"></i> {{ "PLUGIN_ADMIN.EXPAND_ALL"|t }}</span>
<span class="button button-x-small" data-page-toggleall="collapse"><i class="fa fa-fw fa-minus-circle"></i> {{ "PLUGIN_ADMIN.COLLAPSE_ALL"|t }}</span>
</div>
</form>
<div class="pages-list">
@@ -400,8 +400,8 @@
<div class="grav-loading"><div class="grav-loader">Loading...</div></div>
<div class="parents-content"></div>
<div class="button-bar">
<a class="button secondary remodal-cancel" data-remodal-action="cancel" href="#"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|tu }}</a>
<a class="button" data-parents-select href="#"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|tu }}</a>
<a class="button secondary remodal-cancel" data-remodal-action="cancel" href="#"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|t }}</a>
<a class="button" data-parents-select href="#"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|t }}</a>
</div>
</form>
</div>
@@ -418,27 +418,27 @@
<div class="remodal" data-remodal-id="delete" data-remodal-optF#ions="hashTracking: false">
<form>
<h1>{{ "PLUGIN_ADMIN.MODAL_DELETE_PAGE_CONFIRMATION_REQUIRED_TITLE"|tu }}</h1>
<h1>{{ "PLUGIN_ADMIN.MODAL_DELETE_PAGE_CONFIRMATION_REQUIRED_TITLE"|t }}</h1>
<p class="bigger">
{% if context %}
<strong>{{ "PLUGIN_ADMIN.PAGE"|tu }}: {{ context.title }}</strong>
<strong>{{ "PLUGIN_ADMIN.PAGE"|t }}: {{ context.title }}</strong>
{% endif %}
</p>
<p class="bigger">
{{ "PLUGIN_ADMIN.MODAL_DELETE_PAGE_CONFIRMATION_REQUIRED_DESC"|tu }}
{{ "PLUGIN_ADMIN.MODAL_DELETE_PAGE_CONFIRMATION_REQUIRED_DESC"|t }}
</p>
{% if secure_delete %}
<p class="form-secure-delete">
<input id="secure-delete-field" autofocus type="text" placeholder="{{ "PLUGIN_ADMIN.SECURE_DELETE_DESC"|tu }}" />
<input id="secure-delete-field" autofocus type="text" placeholder="{{ "PLUGIN_ADMIN.SECURE_DELETE_DESC"|t }}" />
</p>
{% endif %}
<br>
<div class="button-bar">
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|tu }}</button>
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|t }}</button>
{% if secure_delete %}
<button id="secure-delete-btn" disabled="true" class="button danger disable-after-click" data-delete-action><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONFIRM"|tu }}</button>
<button id="secure-delete-btn" disabled="true" class="button danger disable-after-click" data-delete-action><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONFIRM"|t }}</button>
{% else %}
<a class="button danger disable-after-click" data-delete-action href="#"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|tu }}</a>
<a class="button danger disable-after-click" data-delete-action href="#"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|t }}</a>
{% endif %}
</div>
</form>

View File

@@ -3,7 +3,7 @@
{% set backup_url = uri.addNonce(base_url_relative ~ "/backup.json/id" ~ config.system.param_sep ~ "%BACKUP_ID/task" ~ config.system.param_sep ~ "backup", 'admin-form', 'admin-nonce') %}
<button class="button" data-backup data-ajax="{{ backup_url|replace({'%BACKUP_ID':'0'}) }}">
<i class="fa fa-life-ring"></i> {{ "PLUGIN_ADMIN.BACKUP_NOW"|tu }}
<i class="fa fa-life-ring"></i> {{ "PLUGIN_ADMIN.BACKUP_NOW"|t }}
</button>
<button type="button" class="button dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-caret-down"></i>

View File

@@ -77,7 +77,7 @@
{%- block content %}{% endblock -%}
</div>
{% if config.plugins.admin.show_github_msg %}
<div class="notice alert"><i class="fa fa-github"></i> <a href="https://github.com/getgrav/grav-plugin-admin/issues" target="_blank" rel="noopener noreferrer">{{ 'PLUGIN_ADMIN.ADMIN_REPORT_ISSUE'|tu }}</a></div>
<div class="notice alert"><i class="fa fa-github"></i> <a href="https://github.com/getgrav/grav-plugin-admin/issues" target="_blank" rel="noopener noreferrer">{{ 'PLUGIN_ADMIN.ADMIN_REPORT_ISSUE'|t }}</a></div>
{% endif %}
{% block content_bottom %}{% endblock %}
</div>
@@ -93,48 +93,48 @@
{% block modals %}
<div class="remodal" data-remodal-id="generic" data-remodal-options="hashTracking: false">
<form>
<h1>{{ "PLUGIN_ADMIN.ERROR"|tu }}</h1>
<h1>{{ "PLUGIN_ADMIN.ERROR"|t }}</h1>
<div class="error-content"></div>
<div class="button-bar">
<a class="button remodal-cancel" data-remodal-action="cancel" href="#">{{ "PLUGIN_ADMIN.CLOSE"|tu }}</a>
<a class="button remodal-cancel" data-remodal-action="cancel" href="#">{{ "PLUGIN_ADMIN.CLOSE"|t }}</a>
</div>
</form>
</div>
<div class="remodal" data-remodal-id="metadata" data-remodal-options="hashTracking: false">
<form>
<h1><span>{{ "PLUGIN_ADMIN.METADATA"|tu }} for</span> <strong></strong></h1>
<h1><span>{{ "PLUGIN_ADMIN.METADATA"|t }} for</span> <strong></strong></h1>
<div class="metadata-preview">
<div class="meta-preview"></div>
<div class="meta-content"></div>
</div>
<div class="button-bar">
<a class="button remodal-cancel" data-remodal-action="cancel" href="#">{{ "PLUGIN_ADMIN.CLOSE"|tu }}</a>
<a class="button remodal-cancel" data-remodal-action="cancel" href="#">{{ "PLUGIN_ADMIN.CLOSE"|t }}</a>
</div>
</form>
</div>
<div class="remodal" data-remodal-id="delete-media" data-remodal-options="hashTracking: false">
<form>
<h1>{{ "PLUGIN_ADMIN.MODAL_DELETE_FILE_CONFIRMATION_REQUIRED_TITLE"|tu }}</h1>
<h1>{{ "PLUGIN_ADMIN.MODAL_DELETE_FILE_CONFIRMATION_REQUIRED_TITLE"|t }}</h1>
<p class="bigger">
{{ "PLUGIN_ADMIN.MODAL_DELETE_FILE_CONFIRMATION_REQUIRED_DESC"|tu }}
{{ "PLUGIN_ADMIN.MODAL_DELETE_FILE_CONFIRMATION_REQUIRED_DESC"|t }}
</p>
<br>
<div class="button-bar">
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|tu }}</button>
<button data-remodal-action="confirm" class="button remodal-confirm disable-after-click"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|tu }}</button>
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|t }}</button>
<button data-remodal-action="confirm" class="button remodal-confirm disable-after-click"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|t }}</button>
</div>
</form>
</div>
<div class="remodal" data-remodal-id="update-grav" data-remodal-options="hashTracking: false">
<form>
<h1>{{ "PLUGIN_ADMIN.MODAL_DELETE_FILE_CONFIRMATION_REQUIRED_TITLE"|tu }}</h1>
<h1>{{ "PLUGIN_ADMIN.MODAL_DELETE_FILE_CONFIRMATION_REQUIRED_TITLE"|t }}</h1>
<p class="bigger">
{{ "PLUGIN_ADMIN.MODAL_UPDATE_GRAV_CONFIRMATION_REQUIRED_DESC"|tu }}
{{ "PLUGIN_ADMIN.MODAL_UPDATE_GRAV_CONFIRMATION_REQUIRED_DESC"|t }}
</p>
<br>
<div class="button-bar">
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|tu }}</button>
<button data-remodal-action="confirm" class="button remodal-confirm disable-after-click"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|tu }}</button>
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|t }}</button>
<button data-remodal-action="confirm" class="button remodal-confirm disable-after-click"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|t }}</button>
</div>
</form>
</div>

View File

@@ -1,20 +1,17 @@
{% set form_id = form_id ? form_id : 'blueprints' %}
{% set scope = scope ?: 'data.' %}
{% set field_layout = 'admin' %}
<form {% if form_action %}action="{{ form_action }}"{% endif %} id="{{ form_id }}" method="post" data-grav-form="{{ form_id }}" {% if form.novalidate %}novalidate{% endif %} data-grav-keepalive="true">
{% for field in blueprints.fields %}
{% if field.type %}
{% set value = field.name ? (data.value(field.name) ?? form.value(field.name)) : data.toArray %}
<div class="block block-{{field.type}}">
{% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
</div>
{% endif %}
{% endfor %}
{% embed 'forms/default/fields.html.twig' with {name: null, fields: blueprints.fields} %}
{% block inner_markup_field_open %}<div class="block block-{{ field.type }}">{% endblock %}
{% block inner_markup_field_close %}</div>{% endblock %}
{% endembed %}
<input type="hidden" name="task" value="copy" />
<div class="button-bar">
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> Cancel</button>
<button class="button success" {#data-flex-safe-action#}>{{ "PLUGIN_ADMIN.CONTINUE"|tu }}</button>
<button class="button success" {#data-flex-safe-action#}>{{ "PLUGIN_ADMIN.CONTINUE"|t }}</button>
</div>
{{ nonce_field('admin-form', 'admin-nonce')|raw }}

View File

@@ -1,19 +1,16 @@
{% set form_id = form_id ? form_id : 'blueprints' %}
{% set scope = scope ?: 'data.' %}
{% set field_layout = 'admin' %}
<form {% if form_action %}action="{{ form_action }}"{% endif %} id="{{ form_id }}" method="post" data-grav-form="{{ form_id }}" data-grav-keepalive="true">
{% for field in blueprints.fields %}
{% if field.type %}
{% set value = field.name ? (form.value(field.name) ?? data.value(field.name)) : data.toArray %}
<div class="block block-{{field.type}}">
{% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
</div>
{% endif %}
{% endfor %}
{% embed 'forms/default/fields.html.twig' with {name: null, fields: blueprints.fields} %}
{% block inner_markup_field_open %}<div class="block block-{{ field.type }}">{% endblock %}
{% block inner_markup_field_close %}</div>{% endblock %}
{% endembed %}
<input type="hidden" name="task" value="saveNewFolder" />
<div class="button-bar">
<button class="button primary">{{ "PLUGIN_ADMIN.SAVE"|tu }}</button>
<button class="button primary">{{ "PLUGIN_ADMIN.SAVE"|t }}</button>
</div>
{{ nonce_field('admin-form', 'admin-nonce')|raw }}

View File

@@ -1,20 +1,17 @@
{% set form_id = form_id ? form_id : 'blueprints' %}
{% set scope = scope ?: 'data.' %}
{% set field_layout = 'admin' %}
<form {% if form_action %}action="{{ form_action }}"{% endif %} id="{{ form_id }}" method="post" data-grav-form="{{ form_id }}" {% if form.novalidate %}novalidate{% endif %} data-grav-keepalive="true">
{% for field in blueprints.fields %}
{% if field.type %}
{% set value = field.name ? (form.value(field.name) ?? data.value(field.name)) : data.toArray %}
<div class="block block-{{field.type}}">
{% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
</div>
{% endif %}
{% endfor %}
{% embed 'forms/default/fields.html.twig' with {name: null, fields: blueprints.fields} %}
{% block inner_markup_field_open %}<div class="block block-{{ field.type }}">{% endblock %}
{% block inner_markup_field_close %}</div>{% endblock %}
{% endembed %}
<input type="hidden" name="task" value="continue" />
<div class="button-bar">
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> Cancel</button>
<button class="button success">{{ "PLUGIN_ADMIN.CONTINUE"|tu }}</button>
<button class="button success">{{ "PLUGIN_ADMIN.CONTINUE"|t }}</button>
</div>
{{ nonce_field('admin-form', 'admin-nonce')|raw }}

View File

@@ -1,19 +1,16 @@
{% set form_id = form_id ? form_id : 'blueprints' %}
{% set scope = scope ?: 'data.' %}
{% set field_layout = 'admin' %}
{% if admin.findFormFields('file', blueprints.fields) %}
{% set multipart = ' enctype="multipart/form-data"' %}
{% endif %}
<form {% if form_action %}action="{{ form_action }}"{% endif %} id="{{ form_id }}" method="post" data-grav-form="{{ form_id }}" data-grav-keepalive="true"{{ multipart|raw }}>
{% for field in blueprints.fields %}
{% if field.type %}
{% set value = field.name ? (form.value(field.name) ?? data.value(field.name)) : data.toArray %}
<div class="block block-{{ field.type }}">
{% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
</div>
{% endif %}
{% endfor %}
{% embed 'forms/default/fields.html.twig' with {name: null, fields: blueprints.fields} %}
{% block inner_markup_field_open %}<div class="block block-{{ field.type }}">{% endblock %}
{% block inner_markup_field_close %}</div>{% endblock %}
{% endembed %}
{% if form %}
{% include "forms/fields/formname/formname.html.twig" %}

View File

@@ -2,20 +2,17 @@
{% set data = data ?? form.data %}
{% set form_id = form_id ?? 'blueprints' %}
{% set scope = scope ?: 'data.' %}
{% set field_layout = 'admin' %}
{% if admin.findFormFields('file', blueprints.fields) %}
{% set multipart = ' enctype="multipart/form-data"' %}
{% endif %}
<form {% if form_action %}action="{{ form_action }}"{% endif %} id="{{ form_id }}" method="post" data-grav-form="{{ form_id }}" {% if form.novalidate %}novalidate{% endif %} data-grav-keepalive="true"{{ multipart|raw }}>
{% for field in blueprints.fields %}
{% if field.type %}
{% set value = field.name ? (form.value(field.name) ?? data.value(field.name)) : data.toArray %}
<div class="block block-{{ field.type }}">
{% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
</div>
{% endif %}
{% endfor %}
{% embed 'forms/default/fields.html.twig' with {name: null, fields: blueprints.fields} %}
{% block inner_markup_field_open %}<div class="block block-{{ field.type }}">{% endblock %}
{% block inner_markup_field_close %}</div>{% endblock %}
{% endembed %}
{% if data.extra %}
{% for name, value in data.extra %}

View File

@@ -1,6 +1,6 @@
<div id="news-feed" class="dashboard-item admin-block default-box-shadow">
<h1>
{{ "PLUGIN_ADMIN.NEWS_FEED"|tu }}
{{ "PLUGIN_ADMIN.NEWS_FEED"|t }}
<span class="right">
<a href="#" class="button button-small" data-refresh="feed"><i class="fa fa-refresh"></i></a>
</span>

View File

@@ -3,26 +3,26 @@
<div id="updates" class="dashboard-item dashboard-left">
<div class="secondary-accent default-box-shadow">
<h1>{{ "PLUGIN_ADMIN.MAINTENANCE"|tu }}</h1>
<h1>{{ "PLUGIN_ADMIN.MAINTENANCE"|t }}</h1>
<div class="admin-update-charts">
<div class="updates-chart" data-chart-name="updates" data-chart-type="pie" data-chart-data="{{ {'series': [100, 0]}|json_encode|e('html_attr') }}">
<div class="chart-wrapper">
<div class="ct-chart chart-loader"><i class="fa fa-refresh fa-spin"></i></div>
<span class="numeric hidden"><span>-</span><em>{{ "PLUGIN_ADMIN.UPDATED"|tu|lower }}</em></span>
<span class="numeric hidden"><span>-</span><em>{{ "PLUGIN_ADMIN.UPDATED"|t|lower }}</em></span>
</div>
<p class="js__updates-available-description">&nbsp;</p>
</div>
<div class="backups-chart" data-chart-name="backups" data-chart-type="pie" data-chart-data="{{ {'series': [backup.chart_fill, backup.chart_empty]}|json_encode|e('html_attr') }}">
<div class="chart-wrapper">
<div class="ct-chart chart-loader"><i class="fa fa-refresh fa-spin"></i></div>
<span class="numeric hidden">{{ backup.days|raw }}<em>{{ "PLUGIN_ADMIN.DAYS"|tu|lower }}</em></span>
<span class="numeric hidden">{{ backup.days|raw }}<em>{{ "PLUGIN_ADMIN.DAYS"|t|lower }}</em></span>
</div>
<p class="hidden">{{ "PLUGIN_ADMIN.LAST_BACKUP"|tu }}</p>
<p class="hidden">{{ "PLUGIN_ADMIN.LAST_BACKUP"|t }}</p>
</div>
</div>
<div class="flush-bottom button-bar">
<a class="button hidden" href="#" data-update-packages data-remodal-target="update-packages" data-plugin-action="start-packages-update"><i class="fa fa-cloud-download"></i> {{ "PLUGIN_ADMIN.UPDATE"|tu }}</a>
<a class="button hidden" href="#" data-update-packages data-remodal-target="update-packages" data-plugin-action="start-packages-update"><i class="fa fa-cloud-download"></i> {{ "PLUGIN_ADMIN.UPDATE"|t }}</a>
{% include 'partials/backups-button.html.twig' %}
</div>
</div>

View File

@@ -1,6 +1,6 @@
<div id="notifications" class="dashboard-item admin-block default-box-shadow">
<h1>
{{ "PLUGIN_ADMIN.NOTIFICATIONS"|tu }}
{{ "PLUGIN_ADMIN.NOTIFICATIONS"|t }}
<span class="right">
<a href="#" class="button button-small" data-refresh="notifications"><i class="fa fa-refresh"></i></a>
</span>

View File

@@ -1,9 +1,9 @@
{% if authorize(['admin.pages', 'admin.super']) %}
<div id="latest">
<div class="button-bar">
<a class="button" href="{{ admin_route('/pages') }}"><i class="fa fa-fw fa-file-text-o"></i>{{ "PLUGIN_ADMIN.MANAGE_PAGES"|tu }}</a>
<a class="button" href="{{ admin_route('/pages') }}"><i class="fa fa-fw fa-file-text-o"></i>{{ "PLUGIN_ADMIN.MANAGE_PAGES"|t }}</a>
</div>
<h1>{{ "PLUGIN_ADMIN.LATEST_PAGE_UPDATES"|tu }}</h1>
<h1>{{ "PLUGIN_ADMIN.LATEST_PAGE_UPDATES"|t }}</h1>
<table>
{% for latest in admin.latestPages if admin.latestPages %}
{% set route = latest.rawRoute %}

View File

@@ -1,21 +1,21 @@
{% if authorize(['admin.statistics', 'admin.super']) %}
<div id="popularity" class="dashboard-item dashboard-right" data-chart-name="popularity" data-chart-type="bar" data-chart-data="{{ {'series': [popularity.getDailyChartData['data']], 'labels': popularity.getDailyChartData['labels']}|json_encode|e('html_attr') }}">
<div class="primary-accent default-box-shadow">
<h1>{{ "PLUGIN_ADMIN.VIEWS_STATISTICS"|tu }}</h1>
<h1>{{ "PLUGIN_ADMIN.VIEWS_STATISTICS"|t }}</h1>
<div class="admin-statistics-chart">
<div class="ct-chart chart-loader"><i class="fa fa-refresh fa-spin"></i></div>
<div class="flush-bottom button-bar stats-bar">
<span class="stat">
<b>{{ popularity.getDailyTotal }}</b>
<i>{{ "PLUGIN_ADMIN.TODAY"|tu }}</i>
<i>{{ "PLUGIN_ADMIN.TODAY"|t }}</i>
</span>
<span class="stat">
<b>{{ popularity.getWeeklyTotal }}</b>
<i>{{ "PLUGIN_ADMIN.WEEK"|tu }}</i>
<i>{{ "PLUGIN_ADMIN.WEEK"|t }}</i>
</span>
<span class="stat">
<b>{{ popularity.getMonthlyTotal }}</b>
<i>{{ "PLUGIN_ADMIN.MONTH"|tu }}</i>
<i>{{ "PLUGIN_ADMIN.MONTH"|t }}</i>
</span>
</div>
</div>

View File

@@ -1,5 +1,5 @@
{% if custom_admin_footer %}
{{ custom_admin_footer|raw }}
{% else %}
<a href="http://getgrav.org" target="_blank" rel="noopener noreferrer">Grav</a> v<span class="grav-version">{{ constant('GRAV_VERSION') }}</span> - Admin v{{ admin_version }} - {{ "PLUGIN_ADMIN.WAS_MADE_WITH"|tu|lower }} <i class="fa fa-heart-o pulse"></i> {{ "PLUGIN_ADMIN.BY"|tu|lower }} <a href="https://trilby.media" target="_blank" rel="noopener noreferrer">Trilby Media</a>.
<a href="http://getgrav.org" target="_blank" rel="noopener noreferrer">Grav</a> v<span class="grav-version">{{ constant('GRAV_VERSION') }}</span> - Admin v{{ admin_version }} - {{ "PLUGIN_ADMIN.WAS_MADE_WITH"|t|lower }} <i class="fa fa-heart-o pulse"></i> {{ "PLUGIN_ADMIN.BY"|t|lower }} <a href="https://trilby.media" target="_blank" rel="noopener noreferrer">Trilby Media</a>.
{% endif %}

View File

@@ -1,12 +1,12 @@
<form class="sort-actions" data-grav-selectize="true">
<select>
<option value="name" selected>{{ "PLUGIN_ADMIN.NAME"|tu }}</option>
<option value="author">{{ "PLUGIN_ADMIN.AUTHOR"|tu }}</option>
<option value="name" selected>{{ "PLUGIN_ADMIN.NAME"|t }}</option>
<option value="author">{{ "PLUGIN_ADMIN.AUTHOR"|t }}</option>
<option value="official">GravTeam</option>
<option value="release-date">{{ "PLUGIN_ADMIN.RELEASE_DATE"|tu }}</option>
{% if list_view == 'plugins' and not installing %}<option value="enabled">{{ "PLUGIN_ADMIN.ENABLED"|tu }}</option>{% endif %}
{% if not installing %}<option value="updatable">{{ "PLUGIN_ADMIN.UPDATES_AVAILABLE"|tu }}</option>{% endif %}
{% if config.system.gpm.releases == 'testing' %}<option value="testing">{{ "PLUGIN_ADMIN.TESTING"|tu }}</option>{% endif %}
<option value="release-date">{{ "PLUGIN_ADMIN.RELEASE_DATE"|t }}</option>
{% if list_view == 'plugins' and not installing %}<option value="enabled">{{ "PLUGIN_ADMIN.ENABLED"|t }}</option>{% endif %}
{% if not installing %}<option value="updatable">{{ "PLUGIN_ADMIN.UPDATES_AVAILABLE"|t }}</option>{% endif %}
{% if config.system.gpm.releases == 'testing' %}<option value="testing">{{ "PLUGIN_ADMIN.TESTING"|t }}</option>{% endif %}
</select>
<div class="sort-icon"><i class="fa fa-fw fa-sort-amount-asc"></i></div>
</form>

View File

@@ -10,19 +10,14 @@
{% endblock %}
{% 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) %}
<div>
{% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
</div>
{% endif %}
{% endfor %}
{% embed 'forms/default/fields.html.twig' with {name: null, fields: form.fields} %}
{% block inner_markup_field_open %}<div>{% endblock %}
{% block inner_markup_field_close %}</div>{% endblock %}
{% endembed %}
<div class="form-actions primary-accent">
<a class="button secondary" href="{{ admin_route('/forgot') }}"><i class="fa fa-exclamation-circle"></i> {{ 'PLUGIN_ADMIN.LOGIN_BTN_FORGOT'|tu }}</a>
<button type="submit" class="button primary" name="task" value="login"><i class="fa fa-sign-in"></i> {{ 'PLUGIN_ADMIN.LOGIN_BTN'|tu }}</button>
<a class="button secondary" href="{{ admin_route('/forgot') }}"><i class="fa fa-exclamation-circle"></i> {{ 'PLUGIN_ADMIN.LOGIN_BTN_FORGOT'|t }}</a>
<button type="submit" class="button primary" name="task" value="login"><i class="fa fa-sign-in"></i> {{ 'PLUGIN_ADMIN.LOGIN_BTN'|t }}</button>
</div>
{% endblock %}

View File

@@ -6,8 +6,8 @@
{% block form %}
<div class="form-actions primary-accent">
<a class="button secondary" onclick="window.history.back()"><i class="fa fa-reply"></i> {{ 'PLUGIN_ADMIN.BACK'|tu }}</a>
<button type="submit" class="button primary" name="task" value="logout"><i class="fa fa-sign-in"></i> {{ 'PLUGIN_ADMIN.LOGOUT'|tu }}</button>
<a class="button secondary" onclick="window.history.back()"><i class="fa fa-reply"></i> {{ 'PLUGIN_ADMIN.BACK'|t }}</a>
<button type="submit" class="button primary" name="task" value="logout"><i class="fa fa-sign-in"></i> {{ 'PLUGIN_ADMIN.LOGOUT'|t }}</button>
</div>
{% endblock %}

View File

@@ -4,16 +4,10 @@
{% endblock %}
{% 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) %}
<div>
{% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
</div>
{% endif %}
{% endfor %}
{% embed 'forms/default/fields.html.twig' with {name: null, fields: form.fields} %}
{% block inner_markup_field_open %}<div>{% endblock %}
{% block inner_markup_field_close %}</div>{% endblock %}
{% endembed %}
<div class="{{ form_button_outer_classes ?: 'form-actions primary-accent' }}">
<div class="form-actions primary-accent">

View File

@@ -1,5 +1,6 @@
{% extends 'partials/base.html.twig' %}
{% set scope = form.scope %}
{% set field_layout = 'admin' %}
{% block messages %}{% endblock %}

View File

@@ -3,7 +3,7 @@
<a href="{{ admin_route('/') }}">
{{ config.plugins.admin.logo_text }}
</a>
<a class="front-end hint--left" data-hint="{{ "PLUGIN_ADMIN.VIEW_SITE_TIP"|tu }}" target="_blank" href="{{ base_url_relative_frontend }}"> <i class="fa fa-external-link"></i></a>
<a class="front-end hint--left" data-hint="{{ "PLUGIN_ADMIN.VIEW_SITE_TIP"|t }}" target="_blank" href="{{ base_url_relative_frontend }}"> <i class="fa fa-external-link"></i></a>
</h3>
{% else %}
<div class="admin-logo {{ custom_admin_logo ? 'custom-logo' : 'default-logo' }}">
@@ -15,6 +15,6 @@
{% include('@admin-images/grav-regular.svg') %}
{% endif %}
</a>
<a class="front-end hint--left" data-hint="{{ "PLUGIN_ADMIN.VIEW_SITE_TIP"|tu }}" target="_blank" href="{{ base_url_relative_frontend }}"> <i class="fa fa-external-link"></i></a>
<a class="front-end hint--left" data-hint="{{ "PLUGIN_ADMIN.VIEW_SITE_TIP"|t }}" target="_blank" href="{{ base_url_relative_frontend }}"> <i class="fa fa-external-link"></i></a>
</div>
{% endif %}

View File

@@ -27,7 +27,7 @@
{% import _self as macro %}
<div class="pages-list-container clear block size-1-4">
<h5>{{ "PLUGIN_ADMIN.PAGES"|tu|e }}</h5>
<h5>{{ "PLUGIN_ADMIN.PAGES"|t }}</h5>
<div class="mediapicker-scroll">
<ul class="pages-list depth-0">
{{ macro.loop(pages, 0, _context) }}

View File

@@ -3,12 +3,12 @@
<div id="messages" class="top-notifications-container{{ admin_messages|length or form_message ? ' default-box-shadow' : '' }}">
<div class="single-notification info alert hidden" data-gpm-grav></div>
{%- for message in admin_messages -%}
<div class="{{ message.scope|e }} alert">{{ message.message|raw }}</div>
<div class="{{ message.scope }} alert">{{ message.message|raw }}</div>
{%- endfor -%}
{%- if form_message -%}
<div class="error alert">{{ form_message|raw }}</div>
{%- endif -%}
{%- for message in plugin_messages -%}
<div class="{{ message.scope|e }} alert">{{ message.message|raw }}</div>
<div class="{{ message.scope }} alert">{{ message.message|raw }}</div>
{%- endfor -%}
</div>

View File

@@ -4,72 +4,72 @@
data-remodal-options="hashTracking: false">
<form>
<div class="add-package-installing">
<h1>{{ "PLUGIN_ADMIN.INSTALLING"|tu }}</h1>
<h1>{{ "PLUGIN_ADMIN.INSTALLING"|t }}</h1>
<div class="loading">
<p>
{{ "PLUGIN_ADMIN.LOADING"|tu }}
{{ "PLUGIN_ADMIN.LOADING"|t }}
<span class="fa fa-spin fa-spinner"></span>
</p>
</div>
<div class="install-dependencies-package-container hidden">
<p><strong>{{ "PLUGIN_ADMIN.DEPENDENCIES_NOT_MET_MESSAGE"|tu }}</strong></p>
<p><strong>{{ "PLUGIN_ADMIN.DEPENDENCIES_NOT_MET_MESSAGE"|t }}</strong></p>
<div class="type-install hidden">
<p>{{ "PLUGIN_ADMIN.PACKAGES_NOT_INSTALLED"|tu }}:</p>
<p>{{ "PLUGIN_ADMIN.PACKAGES_NOT_INSTALLED"|t }}:</p>
<ul></ul>
</div>
<div class="type-update hidden">
<p>{{ "PLUGIN_ADMIN.PACKAGES_NEED_UPDATE"|tu }}:</p>
<p>{{ "PLUGIN_ADMIN.PACKAGES_NEED_UPDATE"|t }}:</p>
<ul></ul>
</div>
<div class="type-ignore hidden">
<p>{{ "PLUGIN_ADMIN.PACKAGES_SUGGESTED_UPDATE"|tu }}:</p>
<p>{{ "PLUGIN_ADMIN.PACKAGES_SUGGESTED_UPDATE"|t }}:</p>
<ul></ul>
</div>
<div class="button-bar">
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|tu }}</button>
<a data-{{ type }}-action="install-dependencies-and-package" class="button"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|tu }}</a>
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|t }}</button>
<a data-{{ type }}-action="install-dependencies-and-package" class="button"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|t }}</a>
</div>
</div>
<div class="install-package-container hidden">
<p>
{{ "PLUGIN_ADMIN.READY_TO_INSTALL_PACKAGES"|tu }}
{{ "PLUGIN_ADMIN.READY_TO_INSTALL_PACKAGES"|t }}
</p>
<ul class="packages-names-list"></ul>
<div class="button-bar">
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|tu }}</button>
<a data-{{ type }}-action="install-package" class="button"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|tu }}</a>
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|t }}</button>
<a data-{{ type }}-action="install-package" class="button"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|t }}</a>
</div>
</div>
<div class="install-package-error hidden">
<p>
{{ "PLUGIN_ADMIN.ERROR_INSTALLING_PACKAGES"|tu }}
{{ "PLUGIN_ADMIN.ERROR_INSTALLING_PACKAGES"|t }}
</p>
<ul class="packages-names-list"></ul>
<div class="button-bar">
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CLOSE"|tu }}</button>
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CLOSE"|t }}</button>
</div>
</div>
<div class="installing-dependencies hidden">
<p>
{{ "PLUGIN_ADMIN.INSTALLING_DEPENDENCIES"|tu }}
{{ "PLUGIN_ADMIN.INSTALLING_DEPENDENCIES"|t }}
<span class="fa fa-spin fa-spinner"></span>
</p>
</div>
<div class="installing-package hidden">
<p>
{{ "PLUGIN_ADMIN.INSTALLING_PACKAGES"|tu }}
{{ "PLUGIN_ADMIN.INSTALLING_PACKAGES"|t }}
<span class="fa fa-spin fa-spinner"></span>
</p>
@@ -78,7 +78,7 @@
<div class="installation-complete hidden">
<p>
{{ "PLUGIN_ADMIN.PACKAGES_SUCCESSFULLY_INSTALLED"|tu }}
{{ "PLUGIN_ADMIN.PACKAGES_SUCCESSFULLY_INSTALLED"|t }}
</p>
<ul class="packages-names-list"></ul>
@@ -86,4 +86,4 @@
</div>
</form>
</div>
</div>

View File

@@ -1,13 +1,13 @@
<div class="remodal" data-remodal-id="changes">
<form>
<h1>{{ "PLUGIN_ADMIN.MODAL_CHANGED_DETECTED_TITLE"|tu }}</h1>
<h1>{{ "PLUGIN_ADMIN.MODAL_CHANGED_DETECTED_TITLE"|t }}</h1>
<p class="bigger">
{{ "PLUGIN_ADMIN.MODAL_CHANGED_DETECTED_DESC"|tu }}
{{ "PLUGIN_ADMIN.MODAL_CHANGED_DETECTED_DESC"|t }}
</p>
<br>
<div class="button-bar">
<a class="button secondary" data-leave-action="cancel" href="#"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|tu }}</a>
<a class="button" data-leave-action="continue" href="#"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|tu }}</a>
<a class="button secondary" data-leave-action="cancel" href="#"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|t }}</a>
<a class="button" data-leave-action="continue" href="#"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|t }}</a>
</div>
</form>
</div>
</div>

View File

@@ -3,36 +3,36 @@
data-remodal-options="hashTracking: false">
<form>
<div class="reinstall-package-confirm">
<h1>{{ "PLUGIN_ADMIN.REINSTALL_THE"|tu([("PLUGIN_ADMIN." ~ type|upper)|tu])|e }}</h1>
<h1>{{ "PLUGIN_ADMIN.REINSTALL_THE"|t(("PLUGIN_ADMIN." ~ type|upper)|t) }}</h1>
<p class="bigger">
{{ "PLUGIN_ADMIN.CONFIRM_REINSTALL"|tu([("PLUGIN_ADMIN." ~ type|upper)|tu])|e }}
{{ "PLUGIN_ADMIN.CONFIRM_REINSTALL"|t(("PLUGIN_ADMIN." ~ type|upper)|t) }}
</p>
<p class="bigger hidden warning-reinstall-not-latest-release">
{{ "PLUGIN_ADMIN.WARNING_REINSTALL_NOT_LATEST_RELEASE"|tu|e }}
{{ "PLUGIN_ADMIN.WARNING_REINSTALL_NOT_LATEST_RELEASE"|t }}
</p>
<div class="button-bar">
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|tu|e }}</button>
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|t }}</button>
<button data-{{ type|e }}-action="reinstall-package"
data-package-slug="{{ package.slug|e }}"
data-package-type="{{ package.package_type |e }}"
data-package-name="{{ package.name|e }}"
data-package-current-version="{{ package.version|e }}"
class="button"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|tu|e }}</button>
<button data-{{ type }}-action="reinstall-package"
data-package-slug="{{ package.slug }}"
data-package-type="{{ package.package_type }}"
data-package-name="{{ package.name }}"
data-package-current-version="{{ package.version }}"
class="button"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|t }}</button>
<div class="spinning-wheel hidden">
{{ "PLUGIN_ADMIN.INSTALLING"|tu|e }}.. <i class="fa fa-spinner fa-spin"></i>
{{ "PLUGIN_ADMIN.INSTALLING"|t }}.. <i class="fa fa-spinner fa-spin"></i>
</div>
</div>
</div>
<div class="reinstall-package-done hidden">
<h1>{{ "PLUGIN_ADMIN.REINSTALLED_SUCCESSFULLY"|tu([("PLUGIN_ADMIN." ~ type|upper)|tu])|e }}</h1>
<h1>{{ "PLUGIN_ADMIN.REINSTALLED_SUCCESSFULLY"|t(("PLUGIN_ADMIN." ~ type|upper)|t) }}</h1>
</div>
<div class="reinstall-package-error hidden">
<h1>{{ "PLUGIN_ADMIN.ERROR_REINSTALLING_THE"|tu([("PLUGIN_ADMIN." ~ type|upper)|tu])|e }}</h1>
<h1>{{ "PLUGIN_ADMIN.ERROR_REINSTALLING_THE"|t(("PLUGIN_ADMIN." ~ type|upper)|t) }}</h1>
</div>
</form>
</div>

View File

@@ -3,41 +3,41 @@
data-remodal-options="hashTracking: false">
<form>
<div class="remove-package-confirm">
<h1>{{ "PLUGIN_ADMIN.REMOVE_THE"|tu([("PLUGIN_ADMIN." ~ type|upper)|tu]) }}</h1>
<h1>{{ "PLUGIN_ADMIN.REMOVE_THE"|t(("PLUGIN_ADMIN." ~ type|upper)|t) }}</h1>
<p class="bigger">
{{ "PLUGIN_ADMIN.CONFIRM_REMOVAL"|tu([("PLUGIN_ADMIN." ~ type|upper)|tu]) }}
{{ "PLUGIN_ADMIN.CONFIRM_REMOVAL"|t(("PLUGIN_ADMIN." ~ type|upper)|t) }}
</p>
<div class="button-bar">
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|tu }}</button>
<button data-{{ type }}-action="remove-package" data-packages-slugs="{{ package.slug }}" class="button"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|tu }}</button>
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|t }}</button>
<button data-{{ type }}-action="remove-package" data-packages-slugs="{{ package.slug }}" class="button"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|t }}</button>
</div>
</div>
<div class="remove-package-dependencies hidden">
<h1>{{ "PLUGIN_ADMIN.REMOVED_SUCCESSFULLY"|tu([("PLUGIN_ADMIN." ~ type|upper)|tu]) }}</h1>
<h1>{{ "PLUGIN_ADMIN.REMOVED_SUCCESSFULLY"|t(("PLUGIN_ADMIN." ~ type|upper)|t) }}</h1>
<p>
{{ "PLUGIN_ADMIN.ADDITIONAL_DEPENDENCIES_CAN_BE_REMOVED"|tu([("PLUGIN_ADMIN." ~ type|upper)|tu]) }}
{{ "PLUGIN_ADMIN.ADDITIONAL_DEPENDENCIES_CAN_BE_REMOVED"|t(("PLUGIN_ADMIN." ~ type|upper)|t) }}
</p>
<div>
<ul class="package-dependencies-container"></ul>
</div>
<div class="button-bar">
<a href="{{ admin_route('/' ~ type ~ 's') }}" class="button secondary"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CLOSE"|tu }}</a>
<a href="{{ admin_route('/' ~ type ~ 's') }}" class="button secondary"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CLOSE"|t }}</a>
</div>
</div>
<div class="remove-package-done hidden">
<h1>{{ "PLUGIN_ADMIN.REMOVED_SUCCESSFULLY"|tu([("PLUGIN_ADMIN." ~ type|upper)|tu]) }}</h1>
<h1>{{ "PLUGIN_ADMIN.REMOVED_SUCCESSFULLY"|t(("PLUGIN_ADMIN." ~ type|upper)|t) }}</h1>
<div class="button-bar">
<a href="{{ admin_route('/' ~ type ~ 's') }}" class="button secondary"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CLOSE"|tu }}</a>
<a href="{{ admin_route('/' ~ type ~ 's') }}" class="button secondary"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CLOSE"|t }}</a>
</div>
</div>
<div class="remove-package-error hidden">
<h1>{{ "PLUGIN_ADMIN.ERROR_REMOVING_THE"|tu([("PLUGIN_ADMIN." ~ type|upper)|tu]) }}</h1>
<h1>{{ "PLUGIN_ADMIN.ERROR_REMOVING_THE"|t(("PLUGIN_ADMIN." ~ type|upper)|t) }}</h1>
<div class="button-bar">
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|tu }}</button>
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|t }}</button>
</div>
</div>
</form>

View File

@@ -1,16 +1,16 @@
<div class="remodal theme-switcher" data-remodal-id="theme-switch-warn" data-remodal-options="hashTracking: false">
<form>
<h1>{{ "PLUGIN_ADMIN.SWITCHING_TO"|tu }} <strong>{theme_name}</strong></h1>
<h1>{{ "PLUGIN_ADMIN.SWITCHING_TO"|t }} <strong>{theme_name}</strong></h1>
<p class="bigger">
{{ "PLUGIN_ADMIN.SWITCHING_TO_DESCRIPTION"|tu }}
{{ "PLUGIN_ADMIN.SWITCHING_TO_DESCRIPTION"|t }}
</p>
<p class="bigger">
{{ "PLUGIN_ADMIN.SWITCHING_TO_CONFIRMATION"|tu }} <strong>{theme_name}</strong>?
{{ "PLUGIN_ADMIN.SWITCHING_TO_CONFIRMATION"|t }} <strong>{theme_name}</strong>?
</p>
<br>
<div class="button-bar">
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|tu }}</button>
<a class="button continue" href="#"><i class="fa fa-fw fa-check"></i>{{ "PLUGIN_ADMIN.CONTINUE"|tu }}</a>
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|t }}</button>
<a class="button continue" href="#"><i class="fa fa-fw fa-check"></i>{{ "PLUGIN_ADMIN.CONTINUE"|t }}</a>
</div>
</form>
</div>
</div>

View File

@@ -4,72 +4,72 @@
data-remodal-options="hashTracking: false">
<form>
<div class="add-package-installing">
<h1>{{ "PLUGIN_ADMIN.UPDATING"|tu }}</h1>
<h1>{{ "PLUGIN_ADMIN.UPDATING"|t }}</h1>
<div class="loading">
<p>
{{ "PLUGIN_ADMIN.LOADING"|tu }}
{{ "PLUGIN_ADMIN.LOADING"|t }}
<span class="fa fa-spin fa-spinner"></span>
</p>
</div>
<div class="install-dependencies-package-container hidden">
<p><strong>{{ "PLUGIN_ADMIN.DEPENDENCIES_NOT_MET_MESSAGE"|tu }}</strong></p>
<p><strong>{{ "PLUGIN_ADMIN.DEPENDENCIES_NOT_MET_MESSAGE"|t }}</strong></p>
<div class="type-install hidden">
<p>{{ "PLUGIN_ADMIN.PACKAGES_NOT_INSTALLED"|tu }}:</p>
<p>{{ "PLUGIN_ADMIN.PACKAGES_NOT_INSTALLED"|t }}:</p>
<ul></ul>
</div>
<div class="type-update hidden">
<p>{{ "PLUGIN_ADMIN.PACKAGES_NEED_UPDATE"|tu }}:</p>
<p>{{ "PLUGIN_ADMIN.PACKAGES_NEED_UPDATE"|t }}:</p>
<ul></ul>
</div>
<div class="type-ignore hidden">
<p>{{ "PLUGIN_ADMIN.PACKAGES_SUGGESTED_UPDATE"|tu }}:</p>
<p>{{ "PLUGIN_ADMIN.PACKAGES_SUGGESTED_UPDATE"|t }}:</p>
<ul></ul>
</div>
<div class="button-bar">
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|tu }}</button>
<a data-{{ type }}-action="install-dependencies-and-package" class="button"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|tu }}</a>
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|t }}</button>
<a data-{{ type }}-action="install-dependencies-and-package" class="button"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|t }}</a>
</div>
</div>
<div class="install-package-container hidden">
<p>
{{ "PLUGIN_ADMIN.READY_TO_UPDATE_PACKAGES"|tu }}
{{ "PLUGIN_ADMIN.READY_TO_UPDATE_PACKAGES"|t }}
</p>
<ul class="packages-names-list"></ul>
<div class="button-bar">
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|tu }}</button>
<a data-{{ type }}-action="install-package" class="button"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|tu }}</a>
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|t }}</button>
<a data-{{ type }}-action="install-package" class="button"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|t }}</a>
</div>
</div>
<div class="install-package-error hidden">
<p>
{{ "PLUGIN_ADMIN.ERROR_UPDATING_PACKAGES"|tu }}
{{ "PLUGIN_ADMIN.ERROR_UPDATING_PACKAGES"|t }}
</p>
<ul class="packages-names-list"></ul>
<div class="button-bar">
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CLOSE"|tu }}</button>
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CLOSE"|t }}</button>
</div>
</div>
<div class="installing-dependencies hidden">
<p>
{{ "PLUGIN_ADMIN.INSTALLING_DEPENDENCIES"|tu }}
{{ "PLUGIN_ADMIN.INSTALLING_DEPENDENCIES"|t }}
<span class="fa fa-spin fa-spinner"></span>
</p>
</div>
<div class="installing-package hidden">
<p>
{{ "PLUGIN_ADMIN.UPDATING_PACKAGES"|tu }}
{{ "PLUGIN_ADMIN.UPDATING_PACKAGES"|t }}
<span class="fa fa-spin fa-spinner"></span>
</p>
@@ -78,7 +78,7 @@
<div class="installation-complete hidden">
<p>
{{ "PLUGIN_ADMIN.PACKAGES_SUCCESSFULLY_UPDATED"|tu }}
{{ "PLUGIN_ADMIN.PACKAGES_SUCCESSFULLY_UPDATED"|t }}
</p>
<ul class="packages-names-list"></ul>
@@ -86,4 +86,4 @@
</div>
</form>
</div>
</div>

View File

@@ -1,14 +1,14 @@
{% set clear_cache_url = base_url_relative ~ '/cache.json/task' ~ config.system.param_sep ~ 'clearCache'|e('html_attr') %}
<ul id="admin-nav-quick-tray">
{% if authorize(['admin.maintenance', 'admin.super', 'admin.cache']) %}
<li class="hint--bottom" data-hint="{{ "PLUGIN_ADMIN.CLEAR_CACHE"|tu }}">
<li class="hint--bottom" data-hint="{{ "PLUGIN_ADMIN.CLEAR_CACHE"|t }}">
<a data-clear-cache-type="" data-clear-cache="{{ uri.addNonce(clear_cache_url, 'admin-form', 'admin-nonce') }}">
<i class="fa fa-retweet"></i>
</a>
</li>
{% endif %}
{% if authorize(['admin.super']) and config.plugins.admin.whitelabel.quicktray_recompile %}
<li class="hint--bottom" data-hint="{{ "PLUGIN_ADMIN.QUICKTRAY_RECOMPILE_HELP"|tu }}">
<li class="hint--bottom" data-hint="{{ "PLUGIN_ADMIN.QUICKTRAY_RECOMPILE_HELP"|t }}">
<a data-recompile-scss href="#">
<i class="fa fa-paint-brush"></i>
</a>

View File

@@ -14,8 +14,8 @@
{% include 'partials/nav-user-avatar.html.twig' %}
<div class="admin-user-names">
<h4>{{ user.fullname|e }} {% if user.twofa_enabled and config.plugins.admin.twofa_enabled %}<span class="badge">2FA</span>{% endif %}</h4>
<h5>{{ user.title|e }}</h5>
<h4>{{ user.fullname }} {% if user.twofa_enabled and config.plugins.admin.twofa_enabled %}<span class="badge">2FA</span>{% endif %}</h4>
<h5>{{ user.title }}</h5>
</div>
</a>
</div>

View File

@@ -23,7 +23,7 @@
<li class="{{ nav_route|starts_with(location) ? 'selected' : '' }}">
<a href="{{ admin_route(route) }}">
<i class="fa fa-fw {{ item.icon }}"></i>
<em>{{ label|tu }}</em>
<em>{{ label|t }}</em>
{% set badge = item.badge ?? null %}
{% if badge %}
<span class="badges {% if badge.updates %}with-updates{% endif %}">
@@ -39,7 +39,7 @@
{% include 'partials/nav-pro.html.twig' ignore missing %}
<li>
<a href="{{ uri.addNonce(base_url_relative ~ '/task' ~ config.system.param_sep ~ 'logout', 'logout-form', 'logout-nonce') }}"><i class="fa fa-fw fa-sign-out"></i><em>{{ "PLUGIN_ADMIN.LOGOUT"|tu }}</em></a>
<a href="{{ uri.addNonce(base_url_relative ~ '/task' ~ config.system.param_sep ~ 'logout', 'logout-form', 'logout-nonce') }}"><i class="fa fa-fw fa-sign-out"></i><em>{{ "PLUGIN_ADMIN.LOGOUT"|t }}</em></a>
</li>
</ul>
</div>

View File

@@ -1,9 +1,9 @@
{% set legend = {'VISIBLE':'', 'NON_ROUTABLE':'not-routable', 'NON_VISIBLE':'not-visible', 'MODULE':'module'} %}
<div id="pages-legend">
<strong>{{ 'PLUGIN_ADMIN.LEGEND'|tu }}:</strong>
<strong>{{ 'PLUGIN_ADMIN.LEGEND'|t }}:</strong>
<ul>
{% for key, class in legend %}
<li><i class="page-icon fa fa-fw fa-circle-o {{ class }}"></i> {{ ('PLUGIN_ADMIN.'~key)|tu }}</li>
<li><i class="page-icon fa fa-fw fa-circle-o {{ class }}"></i> {{ ('PLUGIN_ADMIN.'~key)|t }}</li>
{% endfor %}
</ul>
</div>

View File

@@ -1,24 +1,21 @@
{% set form_id = form_id ? form_id : 'page-move' %}
{% set scope = scope ?: 'data.' %}
{% set field_layout = 'admin' %}
<form id="{{ form_id }}" method="post" data-grav-form="{{ form_id }}" data-page-move>
<h1>Move</h1>
<div class="grav-loading"><div class="grav-loader">Loading...</div></div>
<div class="parents-content"></div>
{% for field in blueprints.fields %}
{% if field.type %}
{% set value = field.name ? (form.value(field.name) ?? data.value(field.name)) : data.toArray %}
<div class="block block-{{field.type}}">
{% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
</div>
{% endif %}
{% endfor %}
{% embed 'forms/default/fields.html.twig' with {name: null, fields: blueprints.fields} %}
{% block inner_markup_field_open %}<div class="block block-{{ field.type }}">{% endblock %}
{% block inner_markup_field_close %}</div>{% endblock %}
{% endembed %}
{{ nonce_field('admin-form', 'admin-nonce')|raw }}
<div class="button-bar">
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|tu }}</button>
<button class="button primary" name="task" value="save" form="blueprints">{{ "PLUGIN_ADMIN.CONTINUE"|tu }}</button>
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|t }}</button>
<button class="button primary" name="task" value="save" form="blueprints">{{ "PLUGIN_ADMIN.CONTINUE"|t }}</button>
</div>
</form>

View File

@@ -1,7 +1,7 @@
<table>
{% if plugin.author %}
<tr>
<td>{{ "PLUGIN_ADMIN.AUTHOR"|tu }}:</td>
<td>{{ "PLUGIN_ADMIN.AUTHOR"|t }}:</td>
<td class="double">
{% if plugin.author.url %}
<a href="{{ plugin.author.url }}" target="_blank" rel="noopener noreferrer">{{ plugin.author.name }}</a>
@@ -16,31 +16,31 @@
{% endif %}
{% if plugin.homepage %}
<tr>
<td>{{ "PLUGIN_ADMIN.HOMEPAGE"|tu }}:</td>
<td>{{ "PLUGIN_ADMIN.HOMEPAGE"|t }}:</td>
<td class="double"><a href="{{ plugin.homepage }}" target="_blank" rel="noopener noreferrer">{{ plugin.homepage }}</a></td>
</tr>
{% endif %}
{% if plugin.demo %}
<tr>
<td>{{ "PLUGIN_ADMIN.DEMO"|tu }}:</td>
<td>{{ "PLUGIN_ADMIN.DEMO"|t }}:</td>
<td class="double"><a href="{{ plugin.demo }}" target="_blank" rel="noopener noreferrer">{{ plugin.demo }}</a></td>
</tr>
{% endif %}
{% if plugin.bugs %}
<tr>
<td>{{ "PLUGIN_ADMIN.BUG_TRACKER"|tu }}:</td>
<td>{{ "PLUGIN_ADMIN.BUG_TRACKER"|t }}:</td>
<td class="double"><a href="{{ plugin.bugs }}" target="_blank" rel="noopener noreferrer">{{ plugin.bugs }}</a></td>
</tr>
{% endif %}
{% if plugin.keywords %}
<tr>
<td>{{ "PLUGIN_ADMIN.KEYWORDS"|tu }}:</td>
<td>{{ "PLUGIN_ADMIN.KEYWORDS"|t }}:</td>
<td class="double">{{ plugin.keywords|join(', ') }}</td>
</tr>
{% endif %}
{% if plugin.license %}
<tr>
<td>{{ "PLUGIN_ADMIN.LICENSE"|tu }}:</td>
<td>{{ "PLUGIN_ADMIN.LICENSE"|t }}:</td>
{% if plugin.license|starts_with('http') %}
<td class="double"><a href="{{ plugin.license }}" target="_blank">{{ plugin.license }}</a></td>
{% else %}
@@ -51,7 +51,7 @@
{% if plugin.description %}
<tr>
<td>{{ "PLUGIN_ADMIN.DESCRIPTION"|tu }}:</td>
<td>{{ "PLUGIN_ADMIN.DESCRIPTION"|t }}:</td>
<td class="double">{{ plugin.description_html|raw }}</td>
</tr>
{% endif %}
@@ -59,14 +59,14 @@
{% if plugin.readme or plugin.homepage %}
{% set readme_link = plugin.readme ?: plugin.docs|default(plugin.homepage ~ '/blob/master/README.md') %}
<tr>
<td>{{ plugin.readme ? "PLUGIN_ADMIN.README"|tu : "PLUGIN_ADMIN.DOCS"|tu }}:</td>
<td>{{ plugin.readme ? "PLUGIN_ADMIN.README"|t : "PLUGIN_ADMIN.DOCS"|t }}:</td>
<td class="double"><a href="{{ readme_link }}" target="_blank" rel="noopener noreferrer">{{ readme_link }}</a></td>
</tr>
{% endif %}
{% if admin.gpm.findPackage(plugin.slug, true).changelog %}
<tr>
<td>{{ "PLUGIN_ADMIN.CHANGELOG"|tu }}:</td>
<td>{{ "PLUGIN_ADMIN.CHANGELOG"|t }}:</td>
<td class="double"><a class="button button-small" href="#" data-remodal-target="changelog" data-remodal-changelog="{{ admin_route('/changelog/slug:' ~ plugin.slug) }}"><i class="fa fa-binoculars"></i> View Changelog</a></td>
</tr>
{% endif %}

View File

@@ -7,19 +7,19 @@
</div>
<h1>
{{ plugin.name|e }}
{{ plugin.name }}
{% if admin.isTeamGrav(plugin) %}
<small><span class="info-reverse"><i class="fa fa-check-circle" title="{{ "PLUGIN_ADMIN.GRAV_OFFICIAL_PLUGIN"|tu }}"></i></span></small>
<small><span class="info-reverse"><i class="fa fa-check-circle" title="{{ "PLUGIN_ADMIN.GRAV_OFFICIAL_PLUGIN"|t }}"></i></span></small>
{% endif %}
{% if admin.isPremiumProduct(plugin) %}
<small><span class="badge warning premium"><i class="fa fa-star-o"></i> {{ "PLUGIN_ADMIN.PREMIUM_PRODUCT"|tu }}</span></small>
<small><span class="badge warning premium"><i class="fa fa-star-o"></i> {{ "PLUGIN_ADMIN.PREMIUM_PRODUCT"|t }}</span></small>
{% endif %}
{% if plugin.symlink %}
<small class="hint--bottom" data-hint="{{ "PLUGIN_ADMIN.PLUGIN_SYMBOLICALLY_LINKED"|tu }}">
<small class="hint--bottom" data-hint="{{ "PLUGIN_ADMIN.PLUGIN_SYMBOLICALLY_LINKED"|t }}">
<i class="fa fa-fw fa-link"></i>
</small>
{% endif %}
<small>{{ plugin.version ? 'v' ~ plugin.version|e }}</small>
<small>{{ plugin.version ? 'v' ~ plugin.version }}</small>
{% if isTestingRelease %}<span class="gpm-testing">test release</span>{% endif %}
</h1>
<div class="gpm-item-info">
@@ -31,30 +31,29 @@
{% set data = admin.data('plugins/' ~ admin.route) %}
{% if data.get('enabled') %}
{% include 'partials/blueprints.html.twig' with { data: data, blueprints: data.blueprints } %}
{% if (plugin.form.fields.enabled.type != 'hidden' and plugin.form.fields.tabs.fields.login.fields.enabled.type != 'hidden') %}
<div class="button-bar danger">
<span class="danger-zone"></span>
{% if not plugin.symlink %}
<a class="button button-reinstall-package hidden" href="#" data-remodal-target="reinstall-package"><i class="fa fa-fw fa-repeat"></i> {{ "PLUGIN_ADMIN.REINSTALL_PLUGIN"|tu }}</a>
{% endif %}
<a class="button" href="#" data-remodal-target="remove-package"><i class="fa fa-fw fa-warning"></i> {{ "PLUGIN_ADMIN.REMOVE_PLUGIN"|tu }}</a>
</div>
{% endif %}
{% else %}
<form>
<div class="form-field grid">
<div class="form-label block size-1-3">
<label>{{ "PLUGIN_ADMIN.PLUGINS_MUST_BE_ENABLED"|tu }}</label>
<label>{{ "PLUGIN_ADMIN.PLUGINS_MUST_BE_ENABLED"|t }}</label>
</div>
<div class="form-data block size-2-3">
<a class="button" href="{{ uri.addNonce(base_url_relative ~ '/plugins/' ~ plugin.slug ~ '/task' ~ config.system.param_sep ~ 'enable', 'admin-form', 'admin-nonce') ~ '/redirect:true' }}">
<i class="fa fa-power-off" aria-hidden="true"></i> {{ "PLUGIN_ADMIN.ENABLE"|tu }} <strong>{{ plugin.name }}</strong>
<i class="fa fa-power-off" aria-hidden="true"></i> {{ "PLUGIN_ADMIN.ENABLE"|t }} <strong>{{ plugin.name }}</strong>
</a>
</div>
</div>
</form>
{% endif %}
{% if (plugin.form.fields.enabled.type != 'hidden' and plugin.form.fields.tabs.fields.login.fields.enabled.type != 'hidden') %}
<div class="button-bar danger">
<span class="danger-zone"></span>
{% if not plugin.symlink %}
<a class="button button-reinstall-package hidden" href="#" data-remodal-target="reinstall-package"><i class="fa fa-fw fa-repeat"></i> {{ "PLUGIN_ADMIN.REINSTALL_PLUGIN"|t }}</a>
{% endif %}
<a class="button" href="#" data-remodal-target="remove-package"><i class="fa fa-fw fa-warning"></i> {{ "PLUGIN_ADMIN.REMOVE_PLUGIN"|t }}</a>
</div>
{% endif %}
{% else %}
<div class="button-bar success">
{% if (plugin.premium and not admin.license(plugin.slug)) %}
@@ -64,7 +63,7 @@
{% endif %}
<a class="gumroad-button button" href="https://gum.co/{{ plugin.premium.permalink }}" target="_blank" data-gumroad-single-product="true"><i class="fa fa-shopping-cart"></i> {{ plugin.premium.button|default('Purchase') }}</a>
{% else %}
<a class="button" href="#" data-remodal-target="add-package" data-packages-slugs="{{ plugin.slug }}" data-plugin-action="start-package-installation"><i class="fa fa-plus"></i> {{ "PLUGIN_ADMIN.INSTALL_PLUGIN"|tu }}</a>
<a class="button" href="#" data-remodal-target="add-package" data-packages-slugs="{{ plugin.slug }}" data-plugin-action="start-package-installation"><i class="fa fa-plus"></i> {{ "PLUGIN_ADMIN.INSTALL_PLUGIN"|t }}</a>
{% endif %}
</div>
{% endif %}

View File

@@ -5,11 +5,11 @@
{% endif %}
{% include 'partials/list-sort.html.twig' with { list_view: 'plugins' } %}
<h1>
{{ installing ? "PLUGIN_ADMIN.AVAILABLE_PLUGINS"|tu : "PLUGIN_ADMIN.INSTALLED_PLUGINS"|tu }}
{{ installing ? "PLUGIN_ADMIN.AVAILABLE_PLUGINS"|t : "PLUGIN_ADMIN.INSTALLED_PLUGINS"|t }}
</h1>
<form>
<div class="gpm-search">
<input type="text" placeholder="{{ "PLUGIN_ADMIN.RESOURCE_FILTER"|tu }}" data-gpm-filter>
<input type="text" placeholder="{{ "PLUGIN_ADMIN.RESOURCE_FILTER"|t }}" data-gpm-filter>
</div>
</form>
@@ -24,17 +24,17 @@
<i class="fa fa-fw fa-{{ plugin.icon }}"></i>
<a href="{{ admin_route('/plugins/' ~ slug|url_encode) }}">{{ plugin.name }}</a>
{% if admin.isTeamGrav(plugin) %}
<small><span class="info-reverse"><i class="fa fa-check-circle" title="{{ "PLUGIN_ADMIN.GRAV_OFFICIAL_PLUGIN"|tu }}"></i></span></small>
<small><span class="info-reverse"><i class="fa fa-check-circle" title="{{ "PLUGIN_ADMIN.GRAV_OFFICIAL_PLUGIN"|t }}"></i></span></small>
{% endif %}
{% if admin.isPremiumProduct(plugin) %}
{% if not gumroad_loaded %}
{% set gumroad_loaded = true %}
<script src="//gumroad.com/js/gumroad.js"></script>
{% endif %}
<small><span class="badge warning premium"><i class="fa fa-star-o"></i> {{ "PLUGIN_ADMIN.PREMIUM_PRODUCT"|tu }}</span></small>
<small><span class="badge warning premium"><i class="fa fa-star-o"></i> {{ "PLUGIN_ADMIN.PREMIUM_PRODUCT"|t }}</span></small>
{% endif %}
{% if plugin.symlink %}
<span class="hint--bottom" data-hint="{{ "PLUGIN_ADMIN.PLUGIN_SYMBOLICALLY_LINKED"|tu }}">
<span class="hint--bottom" data-hint="{{ "PLUGIN_ADMIN.PLUGIN_SYMBOLICALLY_LINKED"|t }}">
<i class="fa fa-fw fa-link"></i>
</span>
{% endif %}
@@ -54,7 +54,7 @@
{% endif %}
<a class="gumroad-button button" href="https://gum.co/{{ plugin.premium.permalink }}" target="_blank" data-gumroad-single-product="true"><i class="fa fa-shopping-cart"></i> {{ plugin.premium.button|default('Purchase') }}</a>
{% else %}
<a class="button" href="#" data-remodal-target="add-package" data-packages-slugs="{{ plugin.slug }}" data-plugin-action="start-package-installation"><i class="fa fa-plus"></i> {{ "PLUGIN_ADMIN.INSTALL"|tu }}</a>
<a class="button" href="#" data-remodal-target="add-package" data-packages-slugs="{{ plugin.slug }}" data-plugin-action="start-package-installation"><i class="fa fa-plus"></i> {{ "PLUGIN_ADMIN.INSTALL"|t }}</a>
{% endif %}
{% endif %}
<span class="gpm-details-expand"><i class="fa fa-chevron-down"></i></span>
@@ -66,7 +66,7 @@
</td>
</tr>
{% else %}
<tr><td>{{ "PLUGIN_ADMIN.OFFLINE_WARNING"|tu }}</td></tr>
<tr><td>{{ "PLUGIN_ADMIN.OFFLINE_WARNING"|t }}</td></tr>
{% endfor %}
</table>

View File

@@ -1,5 +1,6 @@
{% extends 'partials/base.html.twig' %}
{% set scope = form.scope %}
{% set field_layout = 'admin' %}
{% block body %}
<body id="admin-login-wrapper">

View File

@@ -2,9 +2,9 @@
<form id="gpm-release-toggle">
<div class="switch-toggle switch-grav" data-url="{{ base_url }}/ajax.json/task:gpmRelease">
<input type="radio" value="stable" id="stable" name="channel-switch" class="highlight" {% if config.system.gpm.releases == 'stable' %} checked="checked"{% endif %}>
<label for="stable">{{ "PLUGIN_ADMIN.STABLE"|tu }}</label>
<label for="stable">{{ "PLUGIN_ADMIN.STABLE"|t }}</label>
<input type="radio" value="testing" id="testing" name="channel-switch" class="highlight" {% if config.system.gpm.releases == 'testing' %} checked="checked"{% endif %}>
<label for="testing">{{ "PLUGIN_ADMIN.TESTING"|tu }}</label>
<label for="testing">{{ "PLUGIN_ADMIN.TESTING"|t }}</label>
<a></a>
</div>
</form>

View File

@@ -1,3 +1,3 @@
<div class="spinning-wheel" style="display: none">
{{ "PLUGIN_ADMIN.LOADING"|tu|e }} <i class="fa fa-spinner fa-spin"></i>
{{ "PLUGIN_ADMIN.LOADING"|t }} <i class="fa fa-spinner fa-spin"></i>
</div>

View File

@@ -2,8 +2,8 @@
{% set blueprints = theme.blueprints() %}
<h1>
{{ blueprints.get('name')|e }}
<small>{{ blueprints.get('version') ? 'v' ~ blueprints.get('version')|e }}</small>
{{ blueprints.get('name') }}
<small>{{ blueprints.get('version') ? 'v' ~ blueprints.get('version') }}</small>
</h1>
{% include 'partials/messages.html.twig' %}

View File

@@ -10,19 +10,19 @@
</div>
<h1>
{{ theme.name|e }}
{{ theme.name }}
{% if admin.isTeamGrav(theme) %}
<small><span class="info-reverse"><i class="fa fa-check-circle" title="{{ "PLUGIN_ADMIN.GRAV_OFFICIAL_THEME"|tu }}"></i></span></small>
<small><span class="info-reverse"><i class="fa fa-check-circle" title="{{ "PLUGIN_ADMIN.GRAV_OFFICIAL_THEME"|t }}"></i></span></small>
{% endif %}
{% if admin.isPremiumProduct(theme) %}
<small><span class="badge warning premium"><i class="fa fa-star-o"></i> {{ "PLUGIN_ADMIN.PREMIUM_PRODUCT"|tu }}</span></small>
<small><span class="badge warning premium"><i class="fa fa-star-o"></i> {{ "PLUGIN_ADMIN.PREMIUM_PRODUCT"|t }}</span></small>
{% endif %}
{% if theme.symlink %}
<small class="hint--bottom" data-hint="{{ "PLUGIN_ADMIN.THEME_SYMBOLICALLY_LINKED"|tu }}">
<small class="hint--bottom" data-hint="{{ "PLUGIN_ADMIN.THEME_SYMBOLICALLY_LINKED"|t }}">
<i class="fa fa-fw fa-link"></i>
</small>
{% endif %}
<small>{{ theme.version ? 'v' ~ theme.version|e }}</small>
<small>{{ theme.version ? 'v' ~ theme.version }}</small>
{% if isTestingRelease %}<span class="gpm-testing">test release</span>{% endif %}
</h1>
<div class="gpm-item-info">
@@ -30,13 +30,13 @@
<table>
{% if theme.version %}
<tr>
<td>{{ "PLUGIN_ADMIN.VERSION"|tu }}:</td>
<td>{{ "PLUGIN_ADMIN.VERSION"|t }}:</td>
<td class="double">{{ theme.version }}</td>
</tr>
{% endif %}
{% if theme.author %}
<tr>
<td>{{ "PLUGIN_ADMIN.AUTHOR"|tu }}:</td>
<td>{{ "PLUGIN_ADMIN.AUTHOR"|t }}:</td>
<td class="double">
{% if theme.author.url %}
<a href="{{ theme.author.url }}" target="_blank" rel="noopener noreferrer">{{ theme.author.name }}</a>
@@ -51,25 +51,25 @@
{% endif %}
{% if theme.homepage %}
<tr>
<td>{{ "PLUGIN_ADMIN.HOMEPAGE"|tu }}:</td>
<td>{{ "PLUGIN_ADMIN.HOMEPAGE"|t }}:</td>
<td class="double"><a href="{{ theme.homepage }}" target="_blank" rel="noopener noreferrer">{{ theme.homepage }}</a></td>
</tr>
{% endif %}
{% if theme.demo %}
<tr>
<td>{{ "PLUGIN_ADMIN.DEMO"|tu }}:</td>
<td>{{ "PLUGIN_ADMIN.DEMO"|t }}:</td>
<td class="double"><a href="{{ theme.demo }}" target="_blank" rel="noopener noreferrer">{{ theme.demo }}</a></td>
</tr>
{% endif %}
{% if theme.bugs %}
<tr>
<td>{{ "PLUGIN_ADMIN.BUG_TRACKER"|tu }}:</td>
<td>{{ "PLUGIN_ADMIN.BUG_TRACKER"|t }}:</td>
<td class="double"><a href="{{ theme.bugs }}" target="_blank" rel="noopener noreferrer">{{ theme.bugs }}</a></td>
</tr>
{% endif %}
{% if theme.keywords %}
<tr>
<td>{{ "PLUGIN_ADMIN.KEYWORDS"|tu }}:</td>
<td>{{ "PLUGIN_ADMIN.KEYWORDS"|t }}:</td>
<td class="double">
{{ theme.keywords|join(', ') }}
</td>
@@ -77,7 +77,7 @@
{% endif %}
{% if theme.license %}
<tr>
<td>{{ "PLUGIN_ADMIN.LICENSE"|tu }}:</td>
<td>{{ "PLUGIN_ADMIN.LICENSE"|t }}:</td>
{% if theme.license|starts_with('http') %}
<td class="double"><a href="{{ theme.license }}" target="_blank">{{ theme.license }}</a></td>
{% else %}
@@ -87,7 +87,7 @@
{% endif %}
{% if theme.description %}
<tr>
<td>{{ "PLUGIN_ADMIN.DESCRIPTION"|tu }}:</td>
<td>{{ "PLUGIN_ADMIN.DESCRIPTION"|t }}:</td>
<td class="double">{{ theme.description_html|raw }}</td>
</tr>
{% endif %}
@@ -95,14 +95,14 @@
{% if theme.readme or theme.homepage %}
{% set readme_link = theme.readme ?: theme.docs|default(theme.homepage ~ '/blob/master/README.md') %}
<tr>
<td>{{ theme.readme ? "PLUGIN_ADMIN.README"|tu : "PLUGIN_ADMIN.DOCS"|tu }}:</td>
<td>{{ theme.readme ? "PLUGIN_ADMIN.README"|t : "PLUGIN_ADMIN.DOCS"|t }}:</td>
<td class="double"><a href="{{ readme_link }}" target="_blank" rel="noopener noreferrer">{{ readme_link }}</a></td>
</tr>
{% endif %}
{% if admin.gpm.findPackage(theme.slug, true).changelog %}
<tr>
<td>{{ "PLUGIN_ADMIN.CHANGELOG"|tu }}:</td>
<td>{{ "PLUGIN_ADMIN.CHANGELOG"|t }}:</td>
<td class="double"><a class="button button-small" href="#" data-remodal-target="changelog" data-remodal-changelog="{{ admin_route('/changelog/slug:' ~ theme.slug) }}"><i class="fa fa-binoculars"></i> View Changelog</a></td>
</tr>
{% endif %}
@@ -119,11 +119,11 @@
<form>
<div class="form-field grid">
<div class="form-label block size-1-3">
<label>{{ "PLUGIN_ADMIN.ACTIVATION_REQUIRED"|tu }}</label>
<label>{{ "PLUGIN_ADMIN.ACTIVATION_REQUIRED"|t }}</label>
</div>
<div class="form-data block size-2-3">
<a class="button gpm-actions" data-remodal-target="theme-switch-warn" href="{{ uri.addNonce(base_url_relative ~ '/themes/' ~ theme.slug ~ '/task' ~ config.system.param_sep ~ 'activate', 'admin-form', 'admin-nonce') }}">
<i class="fa fa-power-off" aria-hidden="true"></i> {{ "PLUGIN_ADMIN.ACTIVATE"|tu }} <strong>{{ theme.name }}</strong>
<i class="fa fa-power-off" aria-hidden="true"></i> {{ "PLUGIN_ADMIN.ACTIVATE"|t }} <strong>{{ theme.name }}</strong>
</a>
</div>
</div>
@@ -133,9 +133,9 @@
<div class="button-bar danger">
<span class="danger-zone"></span>
{% if not theme.symlink %}
<a class="button button-reinstall-package hidden" href="#" data-remodal-target="reinstall-package"><i class="fa fa-fw fa-repeat"></i> {{ "PLUGIN_ADMIN.REINSTALL_THEME"|tu }}</a>
<a class="button button-reinstall-package hidden" href="#" data-remodal-target="reinstall-package"><i class="fa fa-fw fa-repeat"></i> {{ "PLUGIN_ADMIN.REINSTALL_THEME"|t }}</a>
{% endif %}
<a class="button" href="#" data-remodal-target="remove-package"><i class="fa fa-fw fa-warning"></i> {{ "PLUGIN_ADMIN.REMOVE_THEME"|tu }}</a>
<a class="button" href="#" data-remodal-target="remove-package"><i class="fa fa-fw fa-warning"></i> {{ "PLUGIN_ADMIN.REMOVE_THEME"|t }}</a>
</div>
{% endif %}
{% else %}
@@ -147,7 +147,7 @@
{% endif %}
<a class="gumroad-button button" href="https://gum.co/{{ theme.premium.permalink }}" target="_blank" data-gumroad-single-product="true"><i class="fa fa-shopping-cart"></i> {{ theme.premium.button|default('Purchase') }}</a>
{% else %}
<a class="button" href="#" data-remodal-target="add-package" data-packages-slugs="{{ theme.slug }}" data-theme-action="start-package-installation"><i class="fa fa-plus"></i> {{ "PLUGIN_ADMIN.INSTALL_THEME"|tu }}</a>
<a class="button" href="#" data-remodal-target="add-package" data-packages-slugs="{{ theme.slug }}" data-theme-action="start-package-installation"><i class="fa fa-plus"></i> {{ "PLUGIN_ADMIN.INSTALL_THEME"|t }}</a>
{% endif %}
</div>
{% endif %}

View File

@@ -5,11 +5,11 @@
{% endif %}
{% include 'partials/list-sort.html.twig' with { list_view: 'themes' } %}
<h1>
{{ installing ? "PLUGIN_ADMIN.AVAILABLE_THEMES"|tu : "PLUGIN_ADMIN.INSTALLED_THEMES"|tu }}
{{ installing ? "PLUGIN_ADMIN.AVAILABLE_THEMES"|t : "PLUGIN_ADMIN.INSTALLED_THEMES"|t }}
</h1>
<form>
<div class="gpm-search">
<input type="text" placeholder="{{ "PLUGIN_ADMIN.RESOURCE_FILTER"|tu }}" data-gpm-filter>
<input type="text" placeholder="{{ "PLUGIN_ADMIN.RESOURCE_FILTER"|t }}" data-gpm-filter>
</div>
</form>
@@ -26,17 +26,17 @@
<i class="fa fa-fw fa-{{ theme.icon }}"></i>
<a href="{{ admin_route('/themes/' ~ slug|url_encode) }}">{{ theme.name }}</a>
{% if admin.isTeamGrav(theme) %}
<small><span class="info-reverse"><i class="fa fa-check-circle" title="{{ "PLUGIN_ADMIN.GRAV_OFFICIAL_THEME"|tu }}"></i></span></small>
<small><span class="info-reverse"><i class="fa fa-check-circle" title="{{ "PLUGIN_ADMIN.GRAV_OFFICIAL_THEME"|t }}"></i></span></small>
{% endif %}
{% if admin.isPremiumProduct(theme) %}
{% if not gumroad_loaded %}
{% set gumroad_loaded = true %}
<script src="//gumroad.com/js/gumroad.js"></script>
{% endif %}
<small><span class="badge warning premium"><i class="fa fa-star-o"></i> {{ "PLUGIN_ADMIN.PREMIUM_PRODUCT"|tu }}</span></small>
<small><span class="badge warning premium"><i class="fa fa-star-o"></i> {{ "PLUGIN_ADMIN.PREMIUM_PRODUCT"|t }}</span></small>
{% endif %}
{% if theme.symlink %}
<span class="hint--bottom" data-hint="{{ "PLUGIN_ADMIN.THEME_SYMBOLICALLY_LINKED"|tu }}">
<span class="hint--bottom" data-hint="{{ "PLUGIN_ADMIN.THEME_SYMBOLICALLY_LINKED"|t }}">
<i class="fa fa-fw fa-link"></i>
</span>
{% endif %}
@@ -56,22 +56,22 @@
{% endif %}
<a class="gumroad-button button" href="https://gum.co/{{ theme.premium.permalink }}" target="_blank" data-gumroad-single-product="true"><i class="fa fa-shopping-cart"></i> {{ theme.premium.button|default('Purchase') }}</a>
{% else %}
<a class="button" href="#" data-remodal-target="add-package" data-packages-slugs="{{ slug }}" data-theme-action="start-package-installation"><i class="fa fa-plus"></i> {{ "PLUGIN_ADMIN.INSTALL"|tu }}</a>
<a class="button" href="#" data-remodal-target="add-package" data-packages-slugs="{{ slug }}" data-theme-action="start-package-installation"><i class="fa fa-plus"></i> {{ "PLUGIN_ADMIN.INSTALL"|t }}</a>
{% endif %}
</div>
{% elseif state == 'active' %}
<div class="gpm-actions">
<i class="fa fa-star"></i> {{ "PLUGIN_ADMIN.ACTIVE_THEME"|tu }}
<i class="fa fa-star"></i> {{ "PLUGIN_ADMIN.ACTIVE_THEME"|t }}
</div>
{% else %}
<a data-remodal-target="theme-switch-warn" href="{{ uri.addNonce(base_url_relative ~ '/themes/' ~ slug ~ '/task' ~ config.system.param_sep ~ 'activate', 'admin-form', 'admin-nonce') }}" class="gpm-actions">
<i class="fa fa-power-off" aria-hidden="true"></i> {{ "PLUGIN_ADMIN.ACTIVATE"|tu }}
<i class="fa fa-power-off" aria-hidden="true"></i> {{ "PLUGIN_ADMIN.ACTIVATE"|t }}
</a>
{% endif %}
</div>
{% else %}
<tr><td>{{ "PLUGIN_ADMIN.OFFLINE_WARNING"|tu }}</td></tr>
<tr><td>{{ "PLUGIN_ADMIN.OFFLINE_WARNING"|t }}</td></tr>
{% endfor %}
</div>

View File

@@ -1,7 +1,7 @@
<div class="button-bar">
<a class="button" href="{{ base_url }}"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|tu }}</a>
<a class="button" href="{{ base_url }}"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|t }}</a>
{% include 'partials/backups-button.html.twig' %}
<button class="button" type="submit" name="task" value="save" form="blueprints"><i class="fa fa-check"></i> {{ "PLUGIN_ADMIN.SAVE"|tu }}</button>
<button class="button" type="submit" name="task" value="save" form="blueprints"><i class="fa fa-check"></i> {{ "PLUGIN_ADMIN.SAVE"|t }}</button>
</div>
<h1><i class="fa fa-fw fa-briefcase"></i> {{ "PLUGIN_ADMIN.TOOLS"|tu }} - {{ "PLUGIN_ADMIN.BACKUPS"|tu }}</h1>
<h1><i class="fa fa-fw fa-briefcase"></i> {{ "PLUGIN_ADMIN.TOOLS"|t }} - {{ "PLUGIN_ADMIN.BACKUPS"|t }}</h1>

View File

@@ -18,23 +18,23 @@
{% else %}
{% set percent_used = 100 %}
{% endif %}
{% set bar_msg = "PLUGIN_ADMIN.BACKUPS_PURGE_NUMBER"|tu([count, purge_config.max_backups_count]) %}
{% set bar_msg = "PLUGIN_ADMIN.BACKUPS_PURGE_NUMBER"|t(count, purge_config.max_backups_count) %}
{% case 'time' %}
{% set last = backups|last %}
{% set days = last == null ? 0 : (date('now')).diff(last.time).days %}
{% set percent_used = days == 0 ? 0 : 100 - (days / purge_config.max_backups_time * 100) %}
{% set bar_msg = "PLUGIN_ADMIN.BACKUPS_PURGE_TIME"|tu([(purge_config.max_backups_time - days)]) %}
{% set bar_msg = "PLUGIN_ADMIN.BACKUPS_PURGE_TIME"|t(purge_config.max_backups_time - days) %}
{% default %}
{% set space_used = grav.backups.getTotalBackupsSize() %}
{% set space_available = purge_config.max_backups_space * 1024 * 1024 * 1024 %}
{% set percent_used = space_used == 0 ? 0 : 100 - (space_used / space_available * 100) %}
{% set bar_msg = "PLUGIN_ADMIN.BACKUPS_PURGE_SPACE"|tu([space_used|nicefilesize, space_available|nicefilesize]) %}
{% set bar_msg = "PLUGIN_ADMIN.BACKUPS_PURGE_SPACE"|t(space_used|nicefilesize, space_available|nicefilesize) %}
{% endswitch %}
<div id="admin-dashboard">
<div id="backups-stats" class="dashboard-item">
<div class="primary-accent default-box-shadow">
<h1>{{ "PLUGIN_ADMIN.BACKUPS_STATS"|tu }}</h1>
<h1>{{ "PLUGIN_ADMIN.BACKUPS_STATS"|t }}</h1>
<div class="admin-statistics-chart">
<div class="stats-info">
@@ -53,19 +53,19 @@
<div class="flush-bottom button-bar stats-bar">
<span class="stat">
<b>{{ backups|length }}</b>
<i>{{ "PLUGIN_ADMIN.BACKUPS_COUNT"|tu }}</i>
<i>{{ "PLUGIN_ADMIN.BACKUPS_COUNT"|t }}</i>
</span>
<span class="stat">
<b>{{ profiles|count }}</b>
<i>{{ "PLUGIN_ADMIN.BACKUPS_PROFILES_COUNT"|tu }}</i>
<i>{{ "PLUGIN_ADMIN.BACKUPS_PROFILES_COUNT"|t }}</i>
</span>
<span class="stat">
<b>{{ newest_backup }}</b>
<i>{{ "PLUGIN_ADMIN.BACKUPS_NEWEST"|tu }}</i>
<i>{{ "PLUGIN_ADMIN.BACKUPS_NEWEST"|t }}</i>
</span>
<span class="stat">
<b>{{ oldest_backup }}</b>
<i>{{ "PLUGIN_ADMIN.BACKUPS_OLDEST"|tu }}</i>
<i>{{ "PLUGIN_ADMIN.BACKUPS_OLDEST"|t }}</i>
</span>
</div>
</div>

View File

@@ -1,25 +1,25 @@
<h1>{{ "PLUGIN_ADMIN.TOOLS_DIRECT_INSTALL_TITLE"|tu }}</h1>
<h1>{{ "PLUGIN_ADMIN.TOOLS_DIRECT_INSTALL_TITLE"|t }}</h1>
<div class="direct-install-content">
<h2>{{ "PLUGIN_ADMIN.TOOLS_DIRECT_INSTALL_UPLOAD_TITLE"|tu }}</h2>
<p>{{ "PLUGIN_ADMIN.TOOLS_DIRECT_INSTALL_UPLOAD_DESC"|tu|raw }}</p>
<h2>{{ "PLUGIN_ADMIN.TOOLS_DIRECT_INSTALL_UPLOAD_TITLE"|t }}</h2>
<p>{{ "PLUGIN_ADMIN.TOOLS_DIRECT_INSTALL_UPLOAD_DESC"|t|raw }}</p>
<form action="{{ admin_route('/tools/direct-install') }}" method="post" enctype="multipart/form-data">
<input type="file" name="uploaded_file" id="uploaded_file" required accept="application/zip, application/octet-stream">
<input type="submit" value="{{ "PLUGIN_ADMIN.TOOLS_DIRECT_INSTALL_UPLOAD_BUTTON"|tu }}" name="submit" class="button">
<input type="submit" value="{{ "PLUGIN_ADMIN.TOOLS_DIRECT_INSTALL_UPLOAD_BUTTON"|t }}" name="submit" class="button">
<input type="hidden" name="task" value="directInstall" />
{{ nonce_field('admin-form', 'admin-nonce')|raw }}
</form>
<h2>{{ "PLUGIN_ADMIN.TOOLS_DIRECT_INSTALL_URL_TITLE"|tu }}</h2>
<p>{{ "PLUGIN_ADMIN.TOOLS_DIRECT_INSTALL_URL_DESC"|tu|raw }}</p>
<h2>{{ "PLUGIN_ADMIN.TOOLS_DIRECT_INSTALL_URL_TITLE"|t }}</h2>
<p>{{ "PLUGIN_ADMIN.TOOLS_DIRECT_INSTALL_URL_DESC"|t|raw }}</p>
<form action="{{ admin_route('/tools/direct-install') }}" method="post">
<input type="text" name="file_path" class="large" required />
<input type="submit" value="{{ "PLUGIN_ADMIN.INSTALL"|tu }}" name="submit" class="button">
<input type="submit" value="{{ "PLUGIN_ADMIN.INSTALL"|t }}" name="submit" class="button">
<input type="hidden" name="task" value="directInstall" />
{{ nonce_field('admin-form', 'admin-nonce')|raw }}

View File

@@ -1,6 +1,6 @@
<div class="button-bar">
<a class="button" href="{{ base_url }}"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|tu }}</a>
<button class="button" type="submit" name="task" value="save" form="blueprints"><i class="fa fa-check"></i> {{ "PLUGIN_ADMIN.SAVE"|tu }}</button>
<a class="button" href="{{ base_url }}"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|t }}</a>
<button class="button" type="submit" name="task" value="save" form="blueprints"><i class="fa fa-check"></i> {{ "PLUGIN_ADMIN.SAVE"|t }}</button>
</div>
<h1><i class="fa fa-fw fa-briefcase"></i> {{ "PLUGIN_ADMIN.TOOLS"|tu }} - {{ "PLUGIN_ADMIN.SCHEDULER"|tu }}</h1>
<h1><i class="fa fa-fw fa-briefcase"></i> {{ "PLUGIN_ADMIN.TOOLS"|t }} - {{ "PLUGIN_ADMIN.SCHEDULER"|t }}</h1>

View File

@@ -6,21 +6,21 @@
{% if cron_status == 1 %}
<div class="alert notice secondary-accent">
<div id="show-instructions" class="button button-small"><i class="fa fa-clock-o"></i> {{ "PLUGIN_ADMIN.SCHEDULER_INSTALL_INSTRUCTIONS"|tu }}</div>
<i class="fa fa-check"></i> {{ "PLUGIN_ADMIN.SCHEDULER_INSTALLED_READY"|tu }}
<div id="show-instructions" class="button button-small"><i class="fa fa-clock-o"></i> {{ "PLUGIN_ADMIN.SCHEDULER_INSTALL_INSTRUCTIONS"|t }}</div>
<i class="fa fa-check"></i> {{ "PLUGIN_ADMIN.SCHEDULER_INSTALLED_READY"|t }}
</div>
{% elseif cron_status == 2 %}
<div class="alert warning"> {{ "PLUGIN_ADMIN.SCHEDULER_CRON_NA"|tu([user])|raw }}</div>
<div class="alert warning"> {{ "PLUGIN_ADMIN.SCHEDULER_CRON_NA"|t(user)|raw }}</div>
{% else %}
<div class="alert warning"> {{ "PLUGIN_ADMIN.SCHEDULER_NOT_ENABLED"|tu([user])|raw }}</div>
<div class="alert warning"> {{ "PLUGIN_ADMIN.SCHEDULER_NOT_ENABLED"|t(user)|raw }}</div>
{% endif %}
<div class="alert notice"><i class="fa fa-exclamation-circle"></i> {{ "PLUGIN_ADMIN.SCHEDULER_WARNING"|tu([user]) }}</div>
<div class="alert notice"><i class="fa fa-exclamation-circle"></i> {{ "PLUGIN_ADMIN.SCHEDULER_WARNING"|t(user) }}</div>
<div id="cron-install" class="form-border overlay {{ cron_status == 1 ? 'hide' : ''}}">
<pre><code>{{- grav.scheduler.getCronCommand()|trim -}}</code></pre>
<p>{{ "PLUGIN_ADMIN.SCHEDULER_POST_INSTRUCTIONS"|tu([user])|raw }}</p>
<p>{{ "PLUGIN_ADMIN.SCHEDULER_POST_INSTRUCTIONS"|t(user)|raw }}</p>
</div>
{% include 'partials/blueprints.html.twig' with { blueprints: data.blueprints, data: data } %}

View File

@@ -1 +1 @@
<p class="gravatar">{{ "PLUGIN_ADMIN.AVATAR_BY"|tu }} <a href="https://gravatar.com" target="_blank" rel="noopener noreferrer">gravatar.com</a>. {{ "PLUGIN_ADMIN.AVATAR_UPLOAD_OWN"|tu }}</p>
<p class="gravatar">{{ "PLUGIN_ADMIN.AVATAR_BY"|t }} <a href="https://gravatar.com" target="_blank" rel="noopener noreferrer">gravatar.com</a>. {{ "PLUGIN_ADMIN.AVATAR_UPLOAD_OWN"|t }}</p>

View File

@@ -7,7 +7,7 @@
{% set installing = plugin_slug starts with 'install' %}
{% if installing %}
{% set title = "PLUGIN_ADMIN.PLUGINS"|tu %}
{% set title = "PLUGIN_ADMIN.PLUGINS"|t %}
{% else %}
{% set installed = true %}
@@ -19,12 +19,12 @@
{% endif %}
{% set plugin = package.toArray() %}
{% set title = "PLUGIN_ADMIN.PLUGIN"|tu ~ ": " ~ plugin.name|e %}
{% set title = "PLUGIN_ADMIN.PLUGIN"|t ~ ": " ~ plugin.name %}
{% set data = admin.data('plugins/' ~ admin.route) %}
{% set enabled = data.get('enabled') %}
{% endif %}
{% else %}
{% set title = "PLUGIN_ADMIN.PLUGINS"|tu %}
{% set title = "PLUGIN_ADMIN.PLUGINS"|t %}
{% endif %}
{% if admin.route or installing %}
@@ -42,33 +42,33 @@
{% if not admin.route or installing %}
<div class="button-bar">
{% if (installing) %}
<a class="button" href="{{ admin_route('/plugins') }}"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|tu }}</a>
<a class="button" href="{{ admin_route('/plugins') }}"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|t }}</a>
{% else %}
<a class="button" href="{{ admin_route('/') }}"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|tu }}</a>
<a class="button" href="{{ admin_route('/plugins/install') }}"><i class="fa fa-plus"></i> {{ "PLUGIN_ADMIN.ADD"|tu }}</a>
<a class="button" href="{{ admin_route('/') }}"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|t }}</a>
<a class="button" href="{{ admin_route('/plugins/install') }}"><i class="fa fa-plus"></i> {{ "PLUGIN_ADMIN.ADD"|t }}</a>
{% if authorize(['admin.maintenance', 'admin.super']) %}
<button data-gpm-checkupdates="" class="button"><i class="fa fa-refresh"></i> {{ "PLUGIN_ADMIN.CHECK_FOR_UPDATES"|tu }}</button>
<button data-gpm-checkupdates="" class="button"><i class="fa fa-refresh"></i> {{ "PLUGIN_ADMIN.CHECK_FOR_UPDATES"|t }}</button>
{% endif %}
{% endif %}
</div>
<h1><i class="fa fa-fw fa-plug"></i> {{ "PLUGIN_ADMIN.PLUGINS"|tu }}</h1>
<h1><i class="fa fa-fw fa-plug"></i> {{ "PLUGIN_ADMIN.PLUGINS"|t }}</h1>
{% else %}
{% if (installed) %}
<div class="button-bar">
<a class="button" href="{{ admin_route('/plugins') }}"><i class="fa fa-arrow-left"></i> {{ "PLUGIN_ADMIN.BACK_TO_PLUGINS"|tu }}</a>
<a class="button" href="{{ admin_route('/plugins/install') }}"><i class="fa fa-plus"></i> {{ "PLUGIN_ADMIN.ADD"|tu }}</a>
<a class="button" href="{{ admin_route('/plugins') }}"><i class="fa fa-arrow-left"></i> {{ "PLUGIN_ADMIN.BACK_TO_PLUGINS"|t }}</a>
<a class="button" href="{{ admin_route('/plugins/install') }}"><i class="fa fa-plus"></i> {{ "PLUGIN_ADMIN.ADD"|t }}</a>
{% include 'plugins/'~admin.route~'-buttons.html.twig' ignore missing %}
{% if enabled %}
<button class="button" type="submit" name="task" value="save" form="blueprints"><i class="fa fa-check"></i> {{ "PLUGIN_ADMIN.SAVE"|tu }}</button>
<button class="button" type="submit" name="task" value="save" form="blueprints"><i class="fa fa-check"></i> {{ "PLUGIN_ADMIN.SAVE"|t }}</button>
{% endif %}
</div>
{% else %}
<div class="button-bar">
<a class="button" href="{{ admin_route('/plugins/install') }}"><i class="fa fa-arrow-left"></i> {{ "PLUGIN_ADMIN.BACK_TO_PLUGINS"|tu }}</a>
<a class="button" href="{{ admin_route('/plugins/install') }}"><i class="fa fa-arrow-left"></i> {{ "PLUGIN_ADMIN.BACK_TO_PLUGINS"|t }}</a>
</div>
{% endif %}
<h1><i class="fa fa-fw fa-plug"></i> {{ "PLUGIN_ADMIN.PLUGIN"|tu }}: {{ plugin.name|e }}</h1>
<h1><i class="fa fa-fw fa-plug"></i> {{ "PLUGIN_ADMIN.PLUGIN"|t }}: {{ plugin.name }}</h1>
{% endif %}
{% endblock %}

View File

@@ -1,3 +1,3 @@
<button data-preview-scss class="button"><i class="fa fa-fw fa-eye"></i> {{ "PLUGIN_ADMIN.PREVIEW"|tu|e }}</button>
<button data-recompile-scss class="button"><i class="fa fa-fw fa-tasks"></i> {{ "PLUGIN_ADMIN.RECOMPILE"|tu|e }}</button>
<button data-export-scss class="button"><i class="fa fa-fw fa-tasks"></i> {{ "PLUGIN_ADMIN.EXPORT"|tu|e }}</button>
<button data-preview-scss class="button"><i class="fa fa-fw fa-eye"></i> {{ "PLUGIN_ADMIN.PREVIEW"|t }}</button>
<button data-recompile-scss class="button"><i class="fa fa-fw fa-tasks"></i> {{ "PLUGIN_ADMIN.RECOMPILE"|t }}</button>
<button data-export-scss class="button"><i class="fa fa-fw fa-tasks"></i> {{ "PLUGIN_ADMIN.EXPORT"|t }}</button>

View File

@@ -8,10 +8,10 @@
{% block titlebar %}
<div class="button-bar">
<a class="button" href="{{ back_link }}"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|tu }}</a>
<a class="button" href="{{ preview_link }}" target="_blank"><i class="fa fa-external-link"></i> {{ "PLUGIN_ADMIN.OPEN_NEW_TAB"|tu }}</a>
<a class="button" href="{{ back_link }}"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|t }}</a>
<a class="button" href="{{ preview_link }}" target="_blank"><i class="fa fa-external-link"></i> {{ "PLUGIN_ADMIN.OPEN_NEW_TAB"|t }}</a>
</div>
<h1><i class="fa fa-fw fa-eye"></i> {{ "PLUGIN_ADMIN.PREVIEW"|tu }}: <strong>/{{ admin.route }}</strong></h1>
<h1><i class="fa fa-fw fa-eye"></i> {{ "PLUGIN_ADMIN.PREVIEW"|t }}: <strong>/{{ admin.route }}</strong></h1>
{% endblock %}
{% block content_wrapper %}

View File

@@ -7,20 +7,15 @@
{% endblock %}
{% 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) %}
<div class="wrapper-{{ field.name }}">
{% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
</div>
{% endif %}
{% endfor %}
{% embed 'forms/default/fields.html.twig' with {name: null, fields: form.fields} %}
{% block inner_markup_field_open %}<div class="wrapper-{{ field.name }}">{% endblock %}
{% block inner_markup_field_close %}</div>{% endblock %}
{% endembed %}
<div class="form-actions primary-accent">
<button type="reset" class="button secondary"><i class="fa fa-exclamation-circle"></i> {{ 'PLUGIN_ADMIN.LOGIN_BTN_CLEAR'|tu }}</button>
<button type="submit" class="button primary" name="task" value="register"><i class="fa fa-sign-in"></i> {{ 'PLUGIN_ADMIN.LOGIN_BTN_CREATE_USER'|tu }}</button>
<button type="reset" class="button secondary"><i class="fa fa-exclamation-circle"></i> {{ 'PLUGIN_ADMIN.LOGIN_BTN_CLEAR'|t }}</button>
<button type="submit" class="button primary" name="task" value="register"><i class="fa fa-sign-in"></i> {{ 'PLUGIN_ADMIN.LOGIN_BTN_CREATE_USER'|t }}</button>
</div>

View File

@@ -1,17 +1,12 @@
{% embed 'partials/login.html.twig' with {title:'Grav Reset 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) %}
<div>
{% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
</div>
{% endif %}
{% endfor %}
{% embed 'forms/default/fields.html.twig' with {name: null, fields: form.fields} %}
{% block inner_markup_field_open %}<div>{% endblock %}
{% block inner_markup_field_close %}</div>{% endblock %}
{% endembed %}
<div class="form-actions primary-accent">
<button type="submit" class="button primary" name="task" value="reset"><i class="fa fa-key"></i> {{ 'PLUGIN_ADMIN.LOGIN_BTN_RESET'|tu }}</button>
<button type="submit" class="button primary" name="task" value="reset"><i class="fa fa-key"></i> {{ 'PLUGIN_ADMIN.LOGIN_BTN_RESET'|t }}</button>
</div>
{% endblock %}

View File

@@ -6,7 +6,7 @@
<div class="admin-block">
<h1>
{{ "PLUGIN_ADMIN.VIEWS_STATISTICS"|tu }}
{{ "PLUGIN_ADMIN.VIEWS_STATISTICS"|t }}
</h1>
{% include 'partials/messages.html.twig' %}

View File

@@ -4,7 +4,7 @@
{% set installing = admin.route starts with 'install' %}
{% if installing %}
{% set title = "PLUGIN_ADMIN.THEMES"|tu %}
{% set title = "PLUGIN_ADMIN.THEMES"|t %}
{% else %}
{% set installed = true %}
@@ -18,10 +18,10 @@
{% set theme = package.toArray() %}
{% set state = config.get('system.pages.theme') == theme.slug ? 'active' : 'inactive' %}
{% set title = "PLUGIN_ADMIN.THEME"|tu ~ ": " ~ theme.name|e %}
{% set title = "PLUGIN_ADMIN.THEME"|t ~ ": " ~ theme.name %}
{% endif %}
{% else %}
{% set title = "PLUGIN_ADMIN.THEMES"|tu %}
{% set title = "PLUGIN_ADMIN.THEMES"|t %}
{% endif %}
{% if admin.route or installing %}
@@ -39,30 +39,30 @@
{% if not admin.route or installing %}
<div class="button-bar">
{% if (installing) %}
<a class="button" href="{{ admin_route('/themes') }}"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|tu }}</a>
<a class="button" href="{{ admin_route('/themes') }}"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|t }}</a>
{% else %}
<a class="button" href="{{ admin_route('/') }}"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|tu }}</a>
<a class="button" href="{{ admin_route('/themes/install') }}"><i class="fa fa-plus"></i> {{ "PLUGIN_ADMIN.ADD"|tu }}</a>
<a class="button" href="{{ admin_route('/') }}"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|t }}</a>
<a class="button" href="{{ admin_route('/themes/install') }}"><i class="fa fa-plus"></i> {{ "PLUGIN_ADMIN.ADD"|t }}</a>
{% if authorize(['admin.maintenance', 'admin.super']) %}
<button data-gpm-checkupdates="" class="button"><i class="fa fa-refresh"></i> {{ "PLUGIN_ADMIN.CHECK_FOR_UPDATES"|tu }}</button>
<button data-gpm-checkupdates="" class="button"><i class="fa fa-refresh"></i> {{ "PLUGIN_ADMIN.CHECK_FOR_UPDATES"|t }}</button>
{% endif %}
{% endif %}
</div>
<h1><i class="fa fa-fw fa-tint"></i> {{ "PLUGIN_ADMIN.THEMES"|tu }}</h1>
<h1><i class="fa fa-fw fa-tint"></i> {{ "PLUGIN_ADMIN.THEMES"|t }}</h1>
{% else %}
{% if (installed) %}
<div class="button-bar">
<a class="button" href="{{ admin_route('/themes') }}"><i class="fa fa-arrow-left"></i> {{ "PLUGIN_ADMIN.BACK_TO_THEMES"|tu }}</a>
<a class="button" href="{{ admin_route('/themes') }}"><i class="fa fa-arrow-left"></i> {{ "PLUGIN_ADMIN.BACK_TO_THEMES"|t }}</a>
{% if state == 'active' %}
<button class="button" type="submit" name="task" value="save" form="blueprints"><i class="fa fa-check"></i> {{ "PLUGIN_ADMIN.SAVE"|tu }}</button>
<button class="button" type="submit" name="task" value="save" form="blueprints"><i class="fa fa-check"></i> {{ "PLUGIN_ADMIN.SAVE"|t }}</button>
{% endif %}
</div>
{% else %}
<div class="button-bar">
<a class="button" href="{{ admin_route('/themes/install') }}"><i class="fa fa-arrow-left"></i> {{ "PLUGIN_ADMIN.BACK_TO_THEMES"|tu }}</a>
<a class="button" href="{{ admin_route('/themes/install') }}"><i class="fa fa-arrow-left"></i> {{ "PLUGIN_ADMIN.BACK_TO_THEMES"|t }}</a>
</div>
{% endif %}
<h1><i class="fa fa-fw fa-tint"></i> {{ "PLUGIN_ADMIN.THEME"|tu }}: {{ theme.name|e }}</h1>
<h1><i class="fa fa-fw fa-tint"></i> {{ "PLUGIN_ADMIN.THEME"|t }}: {{ theme.name }}</h1>
{% endif %}
{% endblock %}

View File

@@ -1,8 +1,8 @@
{% extends 'partials/base.html.twig' %}
{% set tools_slug = uri.basename|e %}
{% set tools_slug = uri.basename %}
{% if tools_slug == 'tools' %}{% set tools_slug = 'backups' %}{% endif %}
{% set title = "PLUGIN_ADMIN.TOOLS"|tu ~ ": " ~ ("PLUGIN_ADMIN." ~ tools_slug|underscorize|upper)|tu %}
{% set title = "PLUGIN_ADMIN.TOOLS"|t ~ ": " ~ ("PLUGIN_ADMIN." ~ tools_slug|underscorize|upper)|t %}
{% set tools = admin.tools() %}
{% set titlebar -%}
@@ -14,9 +14,9 @@
{{ titlebar }}
{% else %}
<div class="button-bar">
<a class="button" href="{{ base_url }}"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|tu }}</a>
<a class="button" href="{{ base_url }}"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|t }}</a>
</div>
<h1><i class="fa fa-fw fa-briefcase"></i> {{ "PLUGIN_ADMIN.TOOLS"|tu }} - {{ ("PLUGIN_ADMIN." ~ tools_slug|underscorize|upper)|tu }}</h1>
<h1><i class="fa fa-fw fa-briefcase"></i> {{ "PLUGIN_ADMIN.TOOLS"|t }} - {{ ("PLUGIN_ADMIN." ~ tools_slug|underscorize|upper)|t }}</h1>
{% endif %}
{% endblock %}
@@ -29,7 +29,7 @@
{% set name = tool|last %}
{% if authorize(perms) %}
<a href="{{ admin_route('/tools/' ~ slug|hyphenize) }}" {% if tools_slug == slug|hyphenize %}class="active"{% endif %}>
{{ name|tu|capitalize }}
{{ name|t|capitalize }}
</a>
{% endif %}
{% endfor %}

View File

@@ -2,32 +2,32 @@
{% if admin.route %}
{% set user = admin.data('users/' ~ admin.route) %}
{% set title = "PLUGIN_ADMIN.USER"|tu ~ ": " ~ admin.route|e %}
{% set title = "PLUGIN_ADMIN.USER"|t ~ ": " ~ admin.route|e %}
{% else %}
{% set title = "PLUGIN_ADMIN_PRO.USERS"|tu %}
{% set title = "PLUGIN_ADMIN_PRO.USERS"|t %}
{% endif %}
{% block titlebar %}
{% if not admin.route %}
{% if authorize(['admin.users', 'admin.super']) %}
<div class="button-bar">
<a class="button" href="#modal" data-remodal-target="modal"><i class="fa fa-plus"></i> {{ "PLUGIN_ADMIN.ADD_ACCOUNT"|tu }}</a>
<a class="button" href="#modal" data-remodal-target="modal"><i class="fa fa-plus"></i> {{ "PLUGIN_ADMIN.ADD_ACCOUNT"|t }}</a>
</div>
<h1><i class="fa fa-fw fa-users"></i> {{ "PLUGIN_ADMIN.USERS"|tu }}</h1>
<h1><i class="fa fa-fw fa-users"></i> {{ "PLUGIN_ADMIN.USERS"|t }}</h1>
{% else %}
<h1>{{ "PLUGIN_ADMIN.ACCESS_DENIED"|tu }}</h1>
<h1>{{ "PLUGIN_ADMIN.ACCESS_DENIED"|t }}</h1>
{% endif %}
{% else %}
{% if authorize(['admin.users', 'admin.super']) or grav.user.username == user.username %}
<div class="button-bar">
{% if config.plugins["admin-pro"].enabled %}
<a class="button" href="{{ base_url }}/users"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|tu }}</a>
<a class="button" href="{{ base_url }}/users"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|t }}</a>
{% endif %}
<button class="button" type="submit" name="task" value="save" form="blueprints"><i class="fa fa-check"></i> {{ "PLUGIN_ADMIN.SAVE"|tu }}</button>
<button class="button" type="submit" name="task" value="save" form="blueprints"><i class="fa fa-check"></i> {{ "PLUGIN_ADMIN.SAVE"|t }}</button>
</div>
<h1><i class="fa fa-fw fa-user"></i> {{ "PLUGIN_ADMIN.USER"|tu }}: {{ user.username|e }}</h1>
<h1><i class="fa fa-fw fa-user"></i> {{ "PLUGIN_ADMIN.USER"|t }}: {{ user.username }}</h1>
{% else %}
<h1>{{ "PLUGIN_ADMIN.ACCESS_DENIED"|tu }}</h1>
<h1>{{ "PLUGIN_ADMIN.ACCESS_DENIED"|t }}</h1>
{% endif %}
{% endif %}
{% endblock %}
@@ -48,14 +48,14 @@
<div class="remodal" data-remodal-id="changes">
<form>
<h1>{{ "PLUGIN_ADMIN.MODAL_CHANGED_DETECTED_TITLE"|tu }}</h1>
<h1>{{ "PLUGIN_ADMIN.MODAL_CHANGED_DETECTED_TITLE"|t }}</h1>
<p class="bigger">
{{ "PLUGIN_ADMIN.MODAL_CHANGED_DETECTED_DESC"|tu }}
{{ "PLUGIN_ADMIN.MODAL_CHANGED_DETECTED_DESC"|t }}
</p>
<br>
<div class="button-bar">
<a class="button secondary" data-leave-action="cancel" href="#"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|tu }}</a>
<a class="button" data-leave-action="continue" href="#"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|tu }}</a>
<a class="button secondary" data-leave-action="cancel" href="#"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|t }}</a>
<a class="button" data-leave-action="continue" href="#"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|t }}</a>
</div>
</form>
</div>

View File

@@ -29,7 +29,7 @@ private static $installed = array (
'aliases' =>
array (
),
'reference' => '0b66fc80312bf6a9553af43e825d731a627a90ed',
'reference' => '315e35fa69d28436e276274382262866360c64e9',
'name' => 'getgrav/grav-plugin-admin',
),
'versions' =>
@@ -41,7 +41,7 @@ private static $installed = array (
'aliases' =>
array (
),
'reference' => '0b66fc80312bf6a9553af43e825d731a627a90ed',
'reference' => '315e35fa69d28436e276274382262866360c64e9',
),
'laminas/laminas-xml' =>
array (
@@ -54,12 +54,12 @@ private static $installed = array (
),
'laminas/laminas-zendframework-bridge' =>
array (
'pretty_version' => '1.2.0',
'version' => '1.2.0.0',
'pretty_version' => '1.3.0',
'version' => '1.3.0.0',
'aliases' =>
array (
),
'reference' => '6cccbddfcfc742eb02158d6137ca5687d92cee32',
'reference' => '13af2502d9bb6f7d33be2de4b51fb68c6cdb476e',
),
'miniflux/picofeed' =>
array (
@@ -79,12 +79,12 @@ private static $installed = array (
),
'scssphp/scssphp' =>
array (
'pretty_version' => 'v1.5.2',
'version' => '1.5.2.0',
'pretty_version' => 'v1.6.0',
'version' => '1.6.0.0',
'aliases' =>
array (
),
'reference' => '6fe16f169f55f5e793474fb210aac0a4481619e5',
'reference' => 'b83594e2323c5d6e80785df3f91b9d1d32aad530',
),
'symfony/polyfill-php72' =>
array (

View File

@@ -63,17 +63,17 @@
},
{
"name": "laminas/laminas-zendframework-bridge",
"version": "1.2.0",
"version_normalized": "1.2.0.0",
"version": "1.3.0",
"version_normalized": "1.3.0.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": {
@@ -85,7 +85,7 @@
"squizlabs/php_codesniffer": "^3.5",
"vimeo/psalm": "^4.6"
},
"time": "2021-02-25T21:54:58+00:00",
"time": "2021-06-24T12:49:22+00:00",
"type": "library",
"extra": {
"laminas": {
@@ -191,17 +191,17 @@
},
{
"name": "scssphp/scssphp",
"version": "v1.5.2",
"version_normalized": "1.5.2.0",
"version": "v1.6.0",
"version_normalized": "1.6.0.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": {
@@ -223,7 +223,7 @@
"ext-iconv": "Can be used as fallback when ext-mbstring is not available",
"ext-mbstring": "For best performance, mbstring should be installed as it is faster than ext-iconv"
},
"time": "2021-05-18T00:05:58+00:00",
"time": "2021-07-02T16:28:10+00:00",
"bin": [
"bin/pscss"
],
@@ -261,7 +261,7 @@
],
"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"
},
"install-path": "../scssphp/scssphp"
}

View File

@@ -6,7 +6,7 @@
'aliases' =>
array (
),
'reference' => '0b66fc80312bf6a9553af43e825d731a627a90ed',
'reference' => '315e35fa69d28436e276274382262866360c64e9',
'name' => 'getgrav/grav-plugin-admin',
),
'versions' =>
@@ -18,7 +18,7 @@
'aliases' =>
array (
),
'reference' => '0b66fc80312bf6a9553af43e825d731a627a90ed',
'reference' => '315e35fa69d28436e276274382262866360c64e9',
),
'laminas/laminas-xml' =>
array (
@@ -31,12 +31,12 @@
),
'laminas/laminas-zendframework-bridge' =>
array (
'pretty_version' => '1.2.0',
'version' => '1.2.0.0',
'pretty_version' => '1.3.0',
'version' => '1.3.0.0',
'aliases' =>
array (
),
'reference' => '6cccbddfcfc742eb02158d6137ca5687d92cee32',
'reference' => '13af2502d9bb6f7d33be2de4b51fb68c6cdb476e',
),
'miniflux/picofeed' =>
array (
@@ -56,12 +56,12 @@
),
'scssphp/scssphp' =>
array (
'pretty_version' => 'v1.5.2',
'version' => '1.5.2.0',
'pretty_version' => 'v1.6.0',
'version' => '1.6.0.0',
'aliases' =>
array (
),
'reference' => '6fe16f169f55f5e793474fb210aac0a4481619e5',
'reference' => 'b83594e2323c5d6e80785df3f91b9d1d32aad530',
),
'symfony/polyfill-php72' =>
array (

View File

@@ -2,6 +2,28 @@
All notable changes to this project will be documented in this file, in reverse chronological order by release.
## 1.2.1 - TBD
### Added
- Nothing.
### Changed
- Nothing.
### Deprecated
- Nothing.
### Removed
- Nothing.
### Fixed
- Nothing.
## 1.2.0 - 2021-02-25
@@ -115,7 +137,7 @@ Feature release (minor)
### Fixed
- [#63](https://github.com/laminas/laminas-zendframework-bridge/pull/63) fixes handling of dependency configuration to ensure each of delegators, initializers, and abstract factories are properly handled during configuraiton post processing. The new approach should allow delegators to work post-migration to Laminas or Mezzio.
- [#63](https://github.com/laminas/laminas-zendframework-bridge/pull/63) fixes handling of dependency configuration to ensure each of delegators, initializers, and abstract factories are properly handled during configuration post processing. The new approach should allow delegators to work post-migration to Laminas or Mezzio.
- [#61](https://github.com/laminas/laminas-zendframework-bridge/pull/61) ensures configuration for delegator factories gets rewritten; the functionality broke in version 1.0.1.
@@ -709,4 +731,4 @@ Feature release (minor)
### Fixed
- Nothing.
- Nothing.

View File

@@ -10,6 +10,12 @@ Project.
This package should be installed only if you are also using the composer plugin
that installs Laminas packages to replace ZF/Apigility/Expressive packages.
This tool supports:
* Zend Framework MVC projects, all v2 and v3 releases
* Apigility projects, all stable versions
* Expressive versions, all stable versions
## Installation
Run the following to install this library:

Some files were not shown because too many files have changed in this diff Show More