Skip to content

Commit

Permalink
Fixed #13854
Browse files Browse the repository at this point in the history
Resolves #13856
  • Loading branch information
brandonkelly committed Oct 23, 2023
1 parent ef7b95b commit ffb774d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes for Craft CMS 4

## Unreleased

- Fixed a bug where it was possible to change the status for entries that didn’t show the Status field, via bulk editing. ([#13854](https://github.com/craftcms/cms/issues/13854))

## 4.5.8 - 2023-10-20

- Improved the styling and accessibility of revision pages. ([#13857](https://github.com/craftcms/cms/pull/13857), [#13850](https://github.com/craftcms/cms/issues/13850))
Expand Down
12 changes: 7 additions & 5 deletions src/elements/actions/SetStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@ public function getTriggerHtml(): ?string
new Craft.ElementActionTrigger({
type: $type,
validateSelection: (selectedItems) => {
const element = selectedItems.find('.element');
return (
Garnish.hasAttr(element, 'data-savable') &&
!Garnish.hasAttr(element, 'data-disallow-status')
);
for (let i = 0; i < selectedItems.length; i++) {
const element = selectedItems.eq(i).find('.element');
if (!Garnish.hasAttr(element, 'data-savable') || Garnish.hasAttr(element, 'data-disallow-status')) {
return false;
}
}
return true;
},
});
})();
Expand Down

0 comments on commit ffb774d

Please sign in to comment.