From f8f35d02493d8930b027a15249119ee2ab48b151 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 20 Dec 2020 11:57:22 +0300 Subject: [PATCH] Form 1.7.0 --- CHANGELOG.md | 8 +++++++- README.md | 6 +++--- app/Models/Fieldsets.php | 8 ++++---- fieldsets/fields/select_media/field.html | 2 +- package.json | 2 +- plugin.yaml | 4 ++-- 6 files changed, 18 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd5a2b1..f0d8efe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ + +# [1.7.0](https://github.com/flextype-plugins/form/compare/v1.6.0...v1.7.0) (2020-12-20) + +### Features + +* **core** update code base for new Flextype 0.9.13 + # [1.6.0](https://github.com/flextype-plugins/form/compare/v1.5.1...v1.6.0) (2020-12-07) @@ -5,7 +12,6 @@ * **core** update code base for new Flextype 0.9.12 - # [1.5.1](https://github.com/flextype-plugins/form/compare/v1.5.0...v1.5.1) (2020-08-26) diff --git a/README.md b/README.md index 603d542..861ba49 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@

Form Plugin for Flextype

-Version License Total downloads Flextype Quality Score Discord +Version License Total downloads Flextype Quality Score Discord

Form Plugin to render user forms for Flextype. @@ -12,7 +12,7 @@ The following dependencies need to be installed for Form Plugin. | Item | Version | Download | |---|---|---| -| [flextype](https://github.com/flextype/flextype) | 0.9.12 | [download](https://github.com/flextype/flextype/releases) | +| [flextype](https://github.com/flextype/flextype) | 0.9.13 | [download](https://github.com/flextype/flextype/releases) | | [twig](https://github.com/flextype-plugins/twig) | >=1.0.0 | [download](https://github.com/flextype-plugins/twig/releases) | | [jquery](https://github.com/flextype-plugins/jquery) | >=1.0.0 | [download](https://github.com/flextype-plugins/jquery/releases) | @@ -506,4 +506,4 @@ flextype()->post('{uri:.+}', function(Request $request, Response $response) { ## LICENSE [The MIT License (MIT)](https://github.com/flextype-plugins/form/blob/master/LICENSE.txt) -Copyright (c) 2018-2020 [Sergey Romanenko](https://github.com/Awilum) +Copyright (c) 2021 [Sergey Romanenko](https://github.com/Awilum) diff --git a/app/Models/Fieldsets.php b/app/Models/Fieldsets.php index 6f7af44..2ccef12 100644 --- a/app/Models/Fieldsets.php +++ b/app/Models/Fieldsets.php @@ -50,7 +50,7 @@ public function fetchSingle(string $id) if (Filesystem::has($fieldset_file)) { if ($fieldset_body = Filesystem::read($fieldset_file)) { - if ($fieldset_decoded = flextype('yaml')->decode($fieldset_body)) { + if ($fieldset_decoded = flextype('serializers')->yaml()->decode($fieldset_body)) { return $fieldset_decoded; } @@ -85,7 +85,7 @@ public function fetchCollection() : array continue; } - $fieldset_content = flextype('yaml')->decode(Filesystem::read($fieldset['path'])); + $fieldset_content = flextype('serializers')->yaml()->decode(Filesystem::read($fieldset['path'])); $fieldsets[$fieldset['basename']] = $fieldset_content['title']; } } @@ -128,7 +128,7 @@ public function update(string $id, array $data) : bool $fieldset_file = $this->getFileLocation($id); if (Filesystem::has($fieldset_file)) { - return Filesystem::write($fieldset_file, flextype('yaml')->encode($data)); + return Filesystem::write($fieldset_file, flextype('serializers')->yaml()->encode($data)); } return false; @@ -149,7 +149,7 @@ public function create(string $id, array $data) : bool $fieldset_file = $this->getFileLocation($id); if (! Filesystem::has($fieldset_file)) { - return Filesystem::write($fieldset_file, flextype('yaml')->encode($data)); + return Filesystem::write($fieldset_file, flextype('serializers')->yaml()->encode($data)); } return false; diff --git a/fieldsets/fields/select_media/field.html b/fieldsets/fields/select_media/field.html index 05e6ae3..27f59f8 100644 --- a/fieldsets/fields/select_media/field.html +++ b/fieldsets/fields/select_media/field.html @@ -1,4 +1,4 @@ -{% set media_files = filesystem_list_contents(PATH_PROJECT ~ '/uploads/entries/' ~ query.id ~ '/') %} +{% set media_files = filesystem_list_contents(PATH_PROJECT ~ '/media/entries/' ~ query.id ~ '/') %}