diff -u b/core/core.libraries.yml b/core/core.libraries.yml --- b/core/core.libraries.yml +++ b/core/core.libraries.yml @@ -203,10 +203,10 @@ - core/drupalSettings - core/jquery.once -drupal.entity: +drupal.entity-form: version: VERSION js: - misc/entity.js: {} + misc/entity-form.js: {} dependencies: - core/jquery - core/drupal diff -u b/core/lib/Drupal/Core/Entity/Form/RevisionableContentEntityForm.php b/core/lib/Drupal/Core/Entity/Form/RevisionableContentEntityForm.php --- b/core/lib/Drupal/Core/Entity/Form/RevisionableContentEntityForm.php +++ b/core/lib/Drupal/Core/Entity/Form/RevisionableContentEntityForm.php @@ -17,7 +17,7 @@ /** * The entity being used by this form. * - * @var \Drupal\Core\Entity\EntityInterface|\Drupal\Core\Entity\RevisionableInterface|\Drupal\Core\Entity\EntityRevisionLogInterface + * @var \Drupal\Core\Entity\ContentEntityInterface */ protected $entity; @@ -95,9 +95,9 @@ if ($this->operation == 'edit') { - $bundleInfo = $this->entityTypeBundleInfo->getBundleInfo($entity_type->id()); - if ($bundleInfo[$this->entity->bundle()]) { - $bundleLabel = $bundleInfo[$this->entity->bundle()]['label']; + $bundle_info = $this->entityTypeBundleInfo->getBundleInfo($entity_type->id()); + if ($bundle_info[$this->entity->bundle()]) { + $bundleLabel = $bundle_info[$this->entity->bundle()]['label']; $form['#title'] = $this->t('Edit @bundle_label @label', [ '@bundle_label' => $bundleLabel, '@label' => $this->entity->label(), @@ -126,13 +126,13 @@ '#open' => $new_revision_default, '#group' => 'advanced', '#weight' => 20, - '#access' => $new_revision_default || ($entity_type->get('admin_permission')) && $account->hasPermission($entity_type->get('admin_permission')), + '#access' => $new_revision_default || $this->entity->get($entity_type->getKey('revision'))->access('update'), '#optional' => TRUE, '#attributes' => [ 'class' => ['entity-content-form-revision-information'], ], '#attached' => [ - 'library' => ['core/drupal.entity'], + 'library' => ['core/drupal.entity-form'], ], ]; @@ -140,7 +140,7 @@ '#type' => 'checkbox', '#title' => $this->t('Create new revision'), '#default_value' => $new_revision_default, - '#access' => !$this->entity->isNew() && ($entity_type->get('admin_permission') || $account->hasPermission($entity_type->get('admin_permission'))), + '#access' => !$this->entity->isNew() && $this->entity->get($entity_type->getKey('revision'))->access('update'), '#group' => 'revision_information', ]; reverted: --- b/core/misc/entity.js +++ a/core/modules/block_content/js/block_content.js @@ -8,20 +8,20 @@ 'use strict'; /** + * Sets summaries about revision and translation of block content. - * Sets summaries about revision and translation of entities. * * @type {Drupal~behavior} * * @prop {Drupal~behaviorAttach} attach + * Attaches summary behaviour block content form tabs. - * Attaches summary behaviour entity form tabs. * * Specifically, it updates summaries to the revision information and the * translation options. */ + Drupal.behaviors.blockContentDetailsSummaries = { - Drupal.behaviors.entityContentDetailsSummaries = { attach: function (context) { var $context = $(context); + $context.find('.block-content-form-revision-information').drupalSetSummary(function (context) { - $context.find('.entity-content-form-revision-information').drupalSetSummary(function (context) { var $revisionContext = $(context); var revisionCheckbox = $revisionContext.find('.js-form-item-revision input'); @@ -36,7 +36,7 @@ return Drupal.t('No revision'); }); + $context.find('fieldset.block-content-translation-options').drupalSetSummary(function (context) { - $context.find('details.entity-translation-options').drupalSetSummary(function (context) { var $translationContext = $(context); var translate; var $checkbox = $translationContext.find('.js-form-item-translation-translate input'); diff -u b/core/modules/system/tests/modules/entity_test/src/EntityTestRevisionForm.php b/core/modules/system/tests/modules/entity_test/src/EntityTestRevisionForm.php --- b/core/modules/system/tests/modules/entity_test/src/EntityTestRevisionForm.php +++ b/core/modules/system/tests/modules/entity_test/src/EntityTestRevisionForm.php @@ -1,16 +1,14 @@