X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fshortcut%2Fsrc%2FShortcutForm.php;h=f41ba253157afb6346195fdb5f12fae1da8b6578;hb=1c1cb0980bfa6caf0c24cce671b6bb541dc87583;hp=fa62cdb685f9ebe3fb4a1099146331221033c6ff;hpb=af6d1fb995500ae68849458ee10d66abbdcfb252;p=yaffs-website diff --git a/web/core/modules/shortcut/src/ShortcutForm.php b/web/core/modules/shortcut/src/ShortcutForm.php index fa62cdb68..f41ba2531 100644 --- a/web/core/modules/shortcut/src/ShortcutForm.php +++ b/web/core/modules/shortcut/src/ShortcutForm.php @@ -19,6 +19,16 @@ class ShortcutForm extends ContentEntityForm { */ protected $entity; + /** + * {@inheritdoc} + */ + public function form(array $form, FormStateInterface $form_state) { + $form = parent::form($form, $form_state); + $form['#attached']['library'][] = 'core/drupal.form'; + + return $form; + } + /** * {@inheritdoc} */ @@ -42,7 +52,7 @@ class ShortcutForm extends ContentEntityForm { else { $message = $this->t('Added a shortcut for %title.', ['%title' => $view_link]); } - drupal_set_message($message); + $this->messenger()->addStatus($message); $form_state->setRedirect( 'entity.shortcut_set.customize_form',