diff --git a/core/modules/media/config/install/core.entity_form_display.media.file.default.yml b/core/modules/media/config/install/core.entity_form_display.media.file.default.yml index 1ffdc33..50d57bc 100644 --- a/core/modules/media/config/install/core.entity_form_display.media.file.default.yml +++ b/core/modules/media/config/install/core.entity_form_display.media.file.default.yml @@ -36,7 +36,7 @@ content: type: boolean_checkbox settings: display_label: true - weight: 120 + weight: 100 region: content third_party_settings: { } uid: diff --git a/core/modules/media/config/install/core.entity_form_display.media.image.default.yml b/core/modules/media/config/install/core.entity_form_display.media.image.default.yml index 8911cdb..6f2323b 100644 --- a/core/modules/media/config/install/core.entity_form_display.media.image.default.yml +++ b/core/modules/media/config/install/core.entity_form_display.media.image.default.yml @@ -38,7 +38,7 @@ content: type: boolean_checkbox settings: display_label: true - weight: 120 + weight: 100 region: content third_party_settings: { } uid: diff --git a/core/modules/media/src/MediaForm.php b/core/modules/media/src/MediaForm.php index 3766950..d20211d 100644 --- a/core/modules/media/src/MediaForm.php +++ b/core/modules/media/src/MediaForm.php @@ -53,30 +53,6 @@ public function form(array $form, FormStateInterface $form_state) { } /** - * Entity builder updating the media status with the submitted value. - * - * @param string $entity_type_id - * The entity type identifier. - * @param \Drupal\media\MediaInterface $media - * The media updated with the submitted values. - * @param array $form - * The complete form array. - * @param \Drupal\Core\Form\FormStateInterface $form_state - * The current state of the form. - * - * @see \Drupal\media\MediaForm::form() - */ - public function updateStatus($entity_type_id, MediaInterface $media, array $form, FormStateInterface $form_state) { - $element = $form_state->getTriggeringElement(); - if (!empty($element['#published_status'])) { - $media->setPublished(); - } - else { - $media->setUnpublished(); - } - } - - /** * {@inheritdoc} */ public function save(array $form, FormStateInterface $form_state) { diff --git a/core/themes/seven/seven.libraries.yml b/core/themes/seven/seven.libraries.yml index 424e7f5..9cffd1d 100644 --- a/core/themes/seven/seven.libraries.yml +++ b/core/themes/seven/seven.libraries.yml @@ -119,3 +119,11 @@ tour-styling: css: theme: css/components/tour.theme.css: {} + +media-form: + version: VERSION + css: + layout: + css/layout/media-add.css: {} + dependencies: + - media/form diff --git a/core/themes/seven/seven.theme b/core/themes/seven/seven.theme index 91c03e6..bea2465 100644 --- a/core/themes/seven/seven.theme +++ b/core/themes/seven/seven.theme @@ -186,3 +186,10 @@ function seven_form_node_form_alter(&$form, FormStateInterface $form_state) { $form['revision_information']['#type'] = 'container'; $form['revision_information']['#group'] = 'meta'; } + +/** + * Implements hook_form_BASE_FORM_ID_alter() for \Drupal\media\MediaForm. + */ +function seven_form_media_form_alter(&$form, FormStateInterface $form_state) { + $form['#attached']['library'][] = 'seven/media-form'; +}