diff --git a/core/modules/node/content_types.js b/core/modules/node/content_types.js index 4ec34aa..7d7c75e 100644 --- a/core/modules/node/content_types.js +++ b/core/modules/node/content_types.js @@ -26,7 +26,7 @@ }); $context.find('#edit-workflow').drupalSetSummary(function (context) { var vals = []; - $(context).find('input[name^="options"]:checked').next('label').each(function () { + $(context).find('.js-option:checked').next('.js-option__label').each(function () { vals.push(Drupal.checkPlain($(this).text())); }); if (!$(context).find('#edit-options-status').is(':checked')) { diff --git a/core/modules/node/src/NodeTypeForm.php b/core/modules/node/src/NodeTypeForm.php index abef502..1067196 100644 --- a/core/modules/node/src/NodeTypeForm.php +++ b/core/modules/node/src/NodeTypeForm.php @@ -152,8 +152,17 @@ public function form(array $form, FormStateInterface $form_state) { 'sticky' => t('Sticky at top of lists'), 'revision' => t('Create new revision'), ], + '#attributes' => [ + 'class' => ['js-option'], + ], '#description' => t('Users with the Administer content permission will be able to override these options.'), ]; + $js_options = ['status', 'promote', 'sticky', 'revision']; + foreach ($js_options as $option) { + $form['workflow']['options'][$option]['#label_attributes'] = [ + 'class' => ['js-option__label'], + ]; + } if ($this->moduleHandler->moduleExists('language')) { $form['language'] = [ '#type' => 'details',