Skip to content

Commit 5637718

Browse files
committed
fix: reposition draft fields
1 parent a341e3f commit 5637718

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [4.0.9] - 2022-11-21
9+
10+
### Fixed
11+
12+
- Fields defined after DraftButton were not saved to draft.
13+
814
## [4.0.8] - 2022-11-21
915

1016
### Fixed

src/Nova/Page.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,6 @@ public function fields(Request $request)
9999
$fields[] = Text::make(__('novaPageManager.locale'), 'locale')->exceptOnForms();
100100
}
101101

102-
if (NovaPageManager::hasNovaDrafts()) {
103-
$fields[] = \OptimistDigital\NovaDrafts\PublishedField::make(__('novaPageManager.status'), 'published');
104-
$fields[] = \OptimistDigital\NovaDrafts\DraftButton::make(__('novaPageManager.draft'),'draft');
105-
$fields[] = \OptimistDigital\NovaDrafts\UnpublishButton::make(__('novaPageManager.unpublish'),'unpublish');
106-
}
107-
108102
if (isset($templateClass) && $templateClass::$seo) $fields[] = new Panel(__('novaPageManager.seo'), $this->getSeoFields());
109103

110104
if (!empty($templateFieldsAndPanels)) {
@@ -117,6 +111,11 @@ public function fields(Request $request)
117111
}
118112
}
119113

114+
if (NovaPageManager::hasNovaDrafts()) {
115+
$fields[] = \OptimistDigital\NovaDrafts\PublishedField::make(__('novaPageManager.status'), 'published');
116+
$fields[] = \OptimistDigital\NovaDrafts\DraftButton::make(__('novaPageManager.draft'),'draft');
117+
$fields[] = \OptimistDigital\NovaDrafts\UnpublishButton::make(__('novaPageManager.unpublish'),'unpublish');
118+
}
120119
return $fields;
121120
}
122121

0 commit comments

Comments
 (0)