Skip to content

Commit

Permalink
Merge branch 'release/5.0.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Jun 15, 2021
2 parents 16de542 + 48678f9 commit 7de0dee
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 17 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# v5.0.3
## 05/15/2021

1. [](#improved)
* Removed the windows `\r\n` line breaks + extraneous escaping in `data.txt.twig`
* Use base64_encode filter rather than function

# v5.0.2
## 04/23/2021

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Form
slug: form
type: plugin
version: 5.0.2
version: 5.0.3
description: Enables the forms handling
icon: check-square
author:
Expand Down
6 changes: 3 additions & 3 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions templates/forms/default/data.txt.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
{%- if show_field %}
{%- set value = form.value(scope ~ (field.name ?? index)) -%}
{%- if value -%}
{{- field.label|t|e }}: {{ string(value is iterable ? value|json_encode : value|escape('yaml')) ~ "\r\n" }}
{{- field.label|t|e }}: {{ string(value is iterable ? value|json_encode : value) ~ "\n" }}
{%- endif -%}
{%- endif %}
{%- endif %}
{%- endfor %}
{%- endmacro %}
{%- import _self as macro %}
{%- autoescape false %}
{{- macro.render_field(form, form.fields, '') ~ "\r\n" }}
{%- endautoescape %}
{{- macro.render_field(form, form.fields, '') ~ "\n" }}
{%- endautoescape %}
6 changes: 3 additions & 3 deletions templates/forms/fields/file/file.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@
{% if type == 'pages' %}
{% set blueprint_name = type ~ '/' ~ blueprint_name %}
{% endif %}
{% set blueprint = base64_encode(blueprint_name) %}
{% set blueprint = blueprint_name|base64_encode %}
{% set real_path = value.thumb ?? global.context.media[path].relativePath ?? global.form.getPagePathFromToken(path) %}
{% set remove = global.form.getFileDeleteAjaxRoute(files.name, path)|string ?: uri.addNonce(
global.base_url_relative ~
'/media.json' ~
'/task' ~ config.system.param_sep ~ 'removeFileFromBlueprint' ~
'/proute' ~ config.system.param_sep ~ base64_encode(route) ~
'/proute' ~ config.system.param_sep ~ route|base64_encode ~
'/blueprint' ~ config.system.param_sep ~ blueprint ~
'/type' ~ config.system.param_sep ~ type ~
'/field' ~ config.system.param_sep ~ files.name ~
'/path' ~ config.system.param_sep ~ base64_encode(value.path), 'admin-form', 'admin-nonce') %}
'/path' ~ config.system.param_sep ~ value.path|base64_encode, 'admin-form', 'admin-nonce') %}

{% set file = value|merge({remove: remove, path: value.thumb_url ?? (uri.rootUrl == '/' ? '/' : uri.rootUrl ~ '/' ~ real_path) }) %}
<div class="hidden" data-file="{{ file|json_encode|e('html_attr') }}"></div>
Expand Down
4 changes: 2 additions & 2 deletions vendor/composer/InstalledVersions.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class InstalledVersions
'aliases' =>
array (
),
'reference' => '3eabc541329e2fc0b9fc2f23e5d5c58d5f0dbc15',
'reference' => 'd53d3124481c8a72f223c49a03e6fd9b1f5bd7ee',
'name' => 'getgrav/grav-plugin-form',
),
'versions' =>
Expand All @@ -41,7 +41,7 @@ class InstalledVersions
'aliases' =>
array (
),
'reference' => '3eabc541329e2fc0b9fc2f23e5d5c58d5f0dbc15',
'reference' => 'd53d3124481c8a72f223c49a03e6fd9b1f5bd7ee',
),
'google/recaptcha' =>
array (
Expand Down
2 changes: 1 addition & 1 deletion vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@
"install-path": "../google/recaptcha"
}
],
"dev": true,
"dev": false,
"dev-package-names": []
}
4 changes: 2 additions & 2 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'aliases' =>
array (
),
'reference' => '3eabc541329e2fc0b9fc2f23e5d5c58d5f0dbc15',
'reference' => 'd53d3124481c8a72f223c49a03e6fd9b1f5bd7ee',
'name' => 'getgrav/grav-plugin-form',
),
'versions' =>
Expand All @@ -18,7 +18,7 @@
'aliases' =>
array (
),
'reference' => '3eabc541329e2fc0b9fc2f23e5d5c58d5f0dbc15',
'reference' => 'd53d3124481c8a72f223c49a03e6fd9b1f5bd7ee',
),
'google/recaptcha' =>
array (
Expand Down
4 changes: 2 additions & 2 deletions vendor/composer/platform_check.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

$issues = array();

if (!(PHP_VERSION_ID >= 70103)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.1.3". You are running ' . PHP_VERSION . '.';
if (!(PHP_VERSION_ID >= 70306)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.3.6". You are running ' . PHP_VERSION . '.';
}

if ($issues) {
Expand Down

0 comments on commit 7de0dee

Please sign in to comment.