diff --git a/core/modules/outside_in/css/outside_in.module.css b/core/modules/outside_in/css/outside_in.module.css index a0bb4a32aa..9d90bf227d 100644 --- a/core/modules/outside_in/css/outside_in.module.css +++ b/core/modules/outside_in/css/outside_in.module.css @@ -22,11 +22,6 @@ pointer-events: inherit; } -.ui-dialog-off-canvas .messages__wrapper:empty { - padding: 0; - margin: 0; -} - /* * Force the tray to be 100% width at the same breakpoint the dialog system uses * to expand dialog widths. diff --git a/core/modules/outside_in/src/Block/BlockEntityOffCanvasForm.php b/core/modules/outside_in/src/Block/BlockEntityOffCanvasForm.php index fb290225c2..709f922e6d 100644 --- a/core/modules/outside_in/src/Block/BlockEntityOffCanvasForm.php +++ b/core/modules/outside_in/src/Block/BlockEntityOffCanvasForm.php @@ -39,7 +39,6 @@ public function title(BlockInterface $block) { */ public function form(array $form, FormStateInterface $form_state) { $form = parent::form($form, $form_state); - $form['#attributes']['data-off-canvas-form'] = TRUE; // Create link to full block form. $query = []; @@ -118,8 +117,9 @@ protected function getPluginForm(BlockPluginInterface $block) { */ public function submitForm(array &$form, FormStateInterface $form_state) { parent::submitForm($form, $form_state); - // \Drupal\block\BlockForm::submitForm() always redirects to block listing. - // This would doesn't work with Ajax submit. + // \Drupal\block\BlockForm::submitForm() always redirects to block listing + // via \Drupal\Core\Form\FormStateInterface::setRedirect(). This method + // does not work with Ajax submit. $form_state->disableRedirect(); } diff --git a/core/modules/outside_in/src/OffCanvasFormDialogTrait.php b/core/modules/outside_in/src/OffCanvasFormDialogTrait.php index 391d7801c8..62a76ba652 100644 --- a/core/modules/outside_in/src/OffCanvasFormDialogTrait.php +++ b/core/modules/outside_in/src/OffCanvasFormDialogTrait.php @@ -140,7 +140,7 @@ public function noSubmit(array &$form, FormStateInterface $form_state) { } /** - * Get the form's redirect URL. + * Gets the form's redirect URL. * * Isolate a form's redirect URL/destination so that it can be used by * ::submitFormDialog or ::submitForm. @@ -153,7 +153,7 @@ protected function getRedirectUrl() { } /** - * Get the URL from the destination service. + * Gets the URL from the destination service. * * @return \Drupal\Core\Url|null * The destination URL or NULL no destination available. @@ -165,7 +165,7 @@ protected function getDestinationUrl() { } /** - * Get the redirect destination path if specified in request. + * Gets the redirect destination path if specified in request. * * \Drupal\Core\Routing\RedirectDestination::get() cannot be used directly * because it will use if 'destination' is not in the query string. diff --git a/core/modules/outside_in/src/Tests/Ajax/OffCanvasDialogTest.php b/core/modules/outside_in/src/Tests/Ajax/OffCanvasDialogTest.php index bf940ce9d5..edf055b577 100644 --- a/core/modules/outside_in/src/Tests/Ajax/OffCanvasDialogTest.php +++ b/core/modules/outside_in/src/Tests/Ajax/OffCanvasDialogTest.php @@ -36,7 +36,7 @@ public function testDialog() { 'command' => 'openDialog', 'selector' => '#drupal-off-canvas', 'settings' => NULL, - 'data' => $dialog_contents . "
\n", + 'data' => $dialog_contents, 'dialogOptions' => [ 'title' => 'AJAX Dialog & contents', diff --git a/core/modules/outside_in/tests/modules/off_canvas_test/src/Form/TestForm.php b/core/modules/outside_in/tests/modules/off_canvas_test/src/Form/TestForm.php index e561e9f595..8a12d192d9 100644 --- a/core/modules/outside_in/tests/modules/off_canvas_test/src/Form/TestForm.php +++ b/core/modules/outside_in/tests/modules/off_canvas_test/src/Form/TestForm.php @@ -24,7 +24,6 @@ public function getFormId() { * {@inheritdoc} */ public function buildForm(array $form, FormStateInterface $form_state) { - $form['#attributes']['data-off-canvas-form'] = TRUE; $form['force_error'] = [ '#type' => 'checkbox', '#title' => $this->t('Force error?'),