Skip to content

Commit

Permalink
autosaveDrafts warning
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Sep 26, 2023
1 parent 9f4bf6e commit 77930ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- When slideouts are opened within Live Preview, they now slide up over the editor pane, rather than covering the preview pane. ([#13739](https://github.com/craftcms/cms/pull/13739))
- Cross-site validation now only involves fields which were actually modified in the element save. ([#13675](https://github.com/craftcms/cms/discussions/13675))
- Row headings within Table fields now get statically translated. ([#13703](https://github.com/craftcms/cms/discussions/13703))
- Element condition settings within field layout components now display a warning if the `autosaveDrafts` config setting is disabled. ([#12348](https://github.com/craftcms/cms/issues/12348))
- Added the `resave/addresses` command. ([#13720](https://github.com/craftcms/cms/discussions/13720))
- The `resave/matrix-blocks` command now supports an `--owner-id` option.
- Added `craft\helpers\App::phpExecutable()`.
Expand Down
6 changes: 6 additions & 0 deletions src/base/FieldLayoutComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,12 @@ public function getSettingsHtml(): string
'instructions' => Craft::t('app', 'Only show when editing {type} that match the following rules:', [
'type' => $elementType::pluralLowerDisplayName(),
]),
'warning' => !Craft::$app->getConfig()->getGeneral()->autosaveDrafts
? sprintf(
'`autosaveDrafts` must be enabled for this condition to take effect automatically when editing %s.',
$elementType::pluralLowerDisplayName(),
)
: null,
]);
}
}
Expand Down

0 comments on commit 77930ee

Please sign in to comment.