diff --git a/CHANGELOG.md b/CHANGELOG.md index 93112bb..b5bff98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,9 @@ # Recipe Changelog -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## 1.0.1 - 2017.02.15 +### Fixed +- Fixed an issue that would cause you to be unable to choose an asset +- Merged the Field rules with parent ## 1.0.0 - 2017.02.10 ### Added diff --git a/composer.json b/composer.json index c0d9ef4..eef83b3 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "nystudio107/craft3-recipe", "description": "A comprehensive recipe FieldType for Craft CMS that includes metric/imperial conversion, portion calculation, and JSON-LD microdata support", "type": "craft-plugin", - "version": "1.0.0", + "version": "1.0.1", "keywords": [ "craft", "cms", diff --git a/src/fields/Recipe.php b/src/fields/Recipe.php index 7f0236b..91f8e02 100644 --- a/src/fields/Recipe.php +++ b/src/fields/Recipe.php @@ -132,7 +132,7 @@ public function getInputHtml($value, ElementInterface $element = null): string if (is_array($value->imageId)) { $value->imageId = $value->imageId[0]; } - $elements = [Craft::$app->getAssets()->getAssetById($this->imageId)]; + $elements = [Craft::$app->getAssets()->getAssetById($value->imageId)]; } // Render the input template @@ -154,7 +154,7 @@ public function getInputHtml($value, ElementInterface $element = null): string 'assetsSourceExists' => count(Craft::$app->getAssets()->findFolders()), 'elements' => $elements, 'elementType' => Asset::class, - 'assetSources' => Asset::sources(), + 'assetSources' => $this->assetSources, ] ); }