Skip to content

Commit

Permalink
fix value rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
kringkaste committed Jul 4, 2022
1 parent c562aef commit 30492dc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Read-only Field Changelog
# Release Notes for Read-only field Plugin

## 2.0.1 - 2022-07-04

### Fixed

- Fixed value rendering.

## 2.0.0 - 2022-04-29

Expand All @@ -17,11 +23,11 @@
## 1.0.1 - 2019-09-14

### Added
-

- Support for Feed-Me plugin

## 1.0.0 - 2019-04-06

### Added
-

- Initial release
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Sometimes you add content to Craft entries (for example via an API) that should

## Requirements

* Craft CMS >= 4.0.0
* Craft CMS >= 4.0.0

## Installation

Expand All @@ -19,9 +19,10 @@ Open your terminal and go to your Craft project:
``` shell
cd /path/to/project
composer require codemonauts/craft-readonly-field
./craft plugin/install readonly
```

In the control panel, go to Settings → Plugins and click the “install” button for *Read-only Field*.
You can also install the plugin via the Plugin Store in the Craft Control Panel.

## Usage

Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "codemonauts/craft-readonly-field",
"description": "Craft CMS plugin to add a simple, read-only plaintext field.",
"version": "2.0.0",
"version": "2.0.1",
"type": "craft-plugin",
"keywords": [
"craft",
Expand All @@ -24,8 +24,7 @@
"issues": "https://github.com/codemonauts/craft-readonly-field/issues"
},
"require": {
"craftcms/cms": "^4.0.0-alpha",
"php": "^8.0"
"craftcms/cms": "^4.0.0"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion src/fields/ReadonlyField.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function getTableAttributeHtml(mixed $value, ElementInterface $element):
* @throws \Twig\Error\LoaderError
* @throws \Twig\Error\SyntaxError
*/
private function renderValue(?string $value, ElementInterface $element): string
private function renderValue(?string $value, ElementInterface $element): ?string
{
if ($this->template !== null) {
try {
Expand Down

0 comments on commit 30492dc

Please sign in to comment.