Commit 581ed44f authored by Crell's avatar Crell

Default the default state to draft, if it exists, because it will 99% of the time.

parent 17359414
......@@ -72,7 +72,7 @@ class BundleModerationConfigurationForm extends EntityForm {
];
}
$states = \Drupal::entityTypeManager()->getStorage('moderation_state')->loadMultiple();
$states = $this->entityTypeManager->getStorage('moderation_state')->loadMultiple();
$options = [];
/** @var ModerationState $state */
foreach ($states as $key => $state) {
......@@ -96,7 +96,7 @@ class BundleModerationConfigurationForm extends EntityForm {
'#empty_option' => t('-- Select --'),
'#options' => $options,
'#description' => t('Select the moderation state for new content'),
'#default_value' => $bundle->getThirdPartySetting('workbench_moderation', 'default_moderation_state', ''),
'#default_value' => $bundle->getThirdPartySetting('workbench_moderation', 'default_moderation_state', 'draft'),
'#states' => [
'visible' => [
':input[name=enable_moderation_state]' => ['checked' => TRUE],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment