Skip to content

Commit

Permalink
### Fixed
Browse files Browse the repository at this point in the history
- Fixed an issue that would cause you to be unable to choose an asset
- Merged the Field rules with parent
  • Loading branch information
Andrew Welch committed Feb 15, 2017
1 parent aa3442b commit 7e83ba1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/fields/Recipe.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
]
);
}
Expand Down

0 comments on commit 7e83ba1

Please sign in to comment.