Skip to content

Commit

Permalink
Adds missing settings template
Browse files Browse the repository at this point in the history
  • Loading branch information
mmikkel committed Sep 1, 2020
1 parent 37b0570 commit 0e3484b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ 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.0 - 2020-08-20
## 1.0.1 - 2020-09-01

### Fixed
- Adds missing settings template

## 1.0.0 - 2020-08-20

### Added
- Initial release
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": "vaersaagod/instructions",
"description": "Adds an \"Instructions\" field type that can be used to render field instructions as native UI elements inside Matrix field layouts.",
"type": "craft-plugin",
"version": "1.0.0",
"version": "1.0.1",
"keywords": [
"craft",
"cms",
Expand Down
2 changes: 1 addition & 1 deletion src/fields/Instructions.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static function hasContentColumn(): bool
*/
public function getSettingsHtml()
{
return Craft::$app->getView()->renderTemplate('dsd/_components/fieldtypes/Instructions/settings',
return Craft::$app->getView()->renderTemplate('instructions/_settings',
[
'field' => $this
]);
Expand Down
12 changes: 12 additions & 0 deletions src/templates/_settings.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% import "_includes/forms" as forms %}

{{ forms.selectField({
label: 'Style'|t('site'),
id: 'style',
name: 'style',
options: [
{label: 'Tip'|t('app'), value: 'tip'},
{label: 'Warning'|t('app'), value: 'warning'},
],
value: field.style|default('tip'),
}) }}

0 comments on commit 0e3484b

Please sign in to comment.