From c88b1bae75214a6d8b447176b9d8fce8ef26357f Mon Sep 17 00:00:00 2001 From: "lee.5151" <lee.5151@osu.edu> Date: Fri, 18 Nov 2022 10:26:23 -0500 Subject: [PATCH] add rm-nolink patch --- composer.json | 3 ++- composer.lock | 2 +- patches/rm-nolink.patch | 19 +++++++++++++++++++ vendor/composer/autoload_classmap.php | 2 ++ vendor/composer/autoload_static.php | 2 ++ vendor/composer/installed.json | 3 ++- vendor/composer/installed.php | 4 ++-- web/core/PATCHES.txt | 4 ++++ .../Plugin/Field/FieldWidget/LinkWidget.php | 4 ++-- 9 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 patches/rm-nolink.patch diff --git a/composer.json b/composer.json index 014b3cb584..ed1c1e4229 100644 --- a/composer.json +++ b/composer.json @@ -280,7 +280,8 @@ "patches": { "drupal/core": { "2862291": "https://www.drupal.org/files/issues/2021-01-11/2862291-34.patch", - "2949017": "https://www.drupal.org/files/issues/2019-12-12/2949017-59.patch" + "2949017": "https://www.drupal.org/files/issues/2019-12-12/2949017-59.patch", + "rm nolink": "patches/rm-nolink.patch" }, "drupal/addtocalendar": { "UTC Time Adjustment": "patches/utc-time-adjustment.patch" diff --git a/composer.lock b/composer.lock index 7245a34680..026b86ab08 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "434bbd8b2b9333df5ac89d358a4ae115", + "content-hash": "57c898b347489d215f8a0e5ace949ee7", "packages": [ { "name": "alchemy/zippy", diff --git a/patches/rm-nolink.patch b/patches/rm-nolink.patch new file mode 100644 index 0000000000..0aa5b7fe7f --- /dev/null +++ b/patches/rm-nolink.patch @@ -0,0 +1,19 @@ +diff --git a/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php b/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php +index 3d6d80f622..bce0544c3d 100644 +--- a/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php ++++ b/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php +@@ -216,12 +216,12 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen + // element prefix and description. + if (!$this->supportsExternalLinks()) { + $element['uri']['#field_prefix'] = rtrim(Url::fromRoute('<front>', [], ['absolute' => TRUE])->toString(), '/'); +- $element['uri']['#description'] = $this->t('This must be an internal path such as %add-node. You can also start typing the title of a piece of content to select it. Enter %front to link to the front page. Enter %nolink to display link text only. Enter %button to display keyboard-accessible link text only.', ['%add-node' => '/node/add', '%front' => '<front>', '%nolink' => '<nolink>', '%button' => '<button>']); ++ $element['uri']['#description'] = $this->t('This must be an internal path such as %add-node. You can also start typing the title of a piece of content to select it. Enter %front to link to the front page.', ['%add-node' => '/node/add', '%front' => '<front>']); + } + // If the field is configured to allow both internal and external links, + // show a useful description. + elseif ($this->supportsExternalLinks() && $this->supportsInternalLinks()) { +- $element['uri']['#description'] = $this->t('Start typing the title of a piece of content to select it. You can also enter an internal path such as %add-node or an external URL such as %url. Enter %front to link to the front page. Enter %nolink to display link text only. Enter %button to display keyboard-accessible link text only.', ['%front' => '<front>', '%add-node' => '/node/add', '%url' => 'http://example.com', '%nolink' => '<nolink>', '%button' => '<button>']); ++ $element['uri']['#description'] = $this->t('Start typing the title of a piece of content to select it. You can also enter an internal path such as %add-node or an external URL such as %url. Enter %front to link to the front page.', ['%front' => '<front>', '%add-node' => '/node/add', '%url' => 'http://example.com']); + } + // If the field is configured to allow only external links, show a useful + // description. diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 7f3992dc8e..69156ac9f9 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -2284,6 +2284,8 @@ 'Drupal\\Core\\Language\\LanguageManager' => $baseDir . '/web/core/lib/Drupal/Core/Language/LanguageManager.php', 'Drupal\\Core\\Language\\LanguageManagerInterface' => $baseDir . '/web/core/lib/Drupal/Core/Language/LanguageManagerInterface.php', 'Drupal\\Core\\Layout\\Annotation\\Layout' => $baseDir . '/web/core/lib/Drupal/Core/Layout/Annotation/Layout.php', + 'Drupal\\Core\\Layout\\Icon\\IconBuilderInterface' => $baseDir . '/web/core/lib/Drupal/Core/Layout/Icon/IconBuilderInterface.php', + 'Drupal\\Core\\Layout\\Icon\\SvgIconBuilder' => $baseDir . '/web/core/lib/Drupal/Core/Layout/Icon/SvgIconBuilder.php', 'Drupal\\Core\\Layout\\LayoutDefault' => $baseDir . '/web/core/lib/Drupal/Core/Layout/LayoutDefault.php', 'Drupal\\Core\\Layout\\LayoutDefinition' => $baseDir . '/web/core/lib/Drupal/Core/Layout/LayoutDefinition.php', 'Drupal\\Core\\Layout\\LayoutInterface' => $baseDir . '/web/core/lib/Drupal/Core/Layout/LayoutInterface.php', diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index dc27cc7768..8144af166e 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -3105,6 +3105,8 @@ class ComposerStaticInit5c689ffcd54b9e495ed983fdce09b530 'Drupal\\Core\\Language\\LanguageManager' => __DIR__ . '/../..' . '/web/core/lib/Drupal/Core/Language/LanguageManager.php', 'Drupal\\Core\\Language\\LanguageManagerInterface' => __DIR__ . '/../..' . '/web/core/lib/Drupal/Core/Language/LanguageManagerInterface.php', 'Drupal\\Core\\Layout\\Annotation\\Layout' => __DIR__ . '/../..' . '/web/core/lib/Drupal/Core/Layout/Annotation/Layout.php', + 'Drupal\\Core\\Layout\\Icon\\IconBuilderInterface' => __DIR__ . '/../..' . '/web/core/lib/Drupal/Core/Layout/Icon/IconBuilderInterface.php', + 'Drupal\\Core\\Layout\\Icon\\SvgIconBuilder' => __DIR__ . '/../..' . '/web/core/lib/Drupal/Core/Layout/Icon/SvgIconBuilder.php', 'Drupal\\Core\\Layout\\LayoutDefault' => __DIR__ . '/../..' . '/web/core/lib/Drupal/Core/Layout/LayoutDefault.php', 'Drupal\\Core\\Layout\\LayoutDefinition' => __DIR__ . '/../..' . '/web/core/lib/Drupal/Core/Layout/LayoutDefinition.php', 'Drupal\\Core\\Layout\\LayoutInterface' => __DIR__ . '/../..' . '/web/core/lib/Drupal/Core/Layout/LayoutInterface.php', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 48aeb140a8..c91c38182e 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -3291,7 +3291,8 @@ }, "patches_applied": { "2862291": "https://www.drupal.org/files/issues/2021-01-11/2862291-34.patch", - "2949017": "https://www.drupal.org/files/issues/2019-12-12/2949017-59.patch" + "2949017": "https://www.drupal.org/files/issues/2019-12-12/2949017-59.patch", + "rm nolink": "patches/rm-nolink.patch" } }, "installation-source": "dist", diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index c17b476d92..dff8f16fe4 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'osu-asc-webservices/d8-upstream', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '0a76c17b3db2f343e4b6386e265aad81acc68d2b', + 'reference' => '2475984787276b11778650ebbcd6963d3ed140b6', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -1594,7 +1594,7 @@ 'osu-asc-webservices/d8-upstream' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '0a76c17b3db2f343e4b6386e265aad81acc68d2b', + 'reference' => '2475984787276b11778650ebbcd6963d3ed140b6', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), diff --git a/web/core/PATCHES.txt b/web/core/PATCHES.txt index 1c020ea007..cccb7c6eeb 100644 --- a/web/core/PATCHES.txt +++ b/web/core/PATCHES.txt @@ -9,3 +9,7 @@ Source: https://www.drupal.org/files/issues/2021-01-11/2862291-34.patch Source: https://www.drupal.org/files/issues/2019-12-12/2949017-59.patch +rm nolink +Source: patches/rm-nolink.patch + + diff --git a/web/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php b/web/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php index 3d6d80f622..bce0544c3d 100644 --- a/web/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php +++ b/web/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php @@ -216,12 +216,12 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen // element prefix and description. if (!$this->supportsExternalLinks()) { $element['uri']['#field_prefix'] = rtrim(Url::fromRoute('<front>', [], ['absolute' => TRUE])->toString(), '/'); - $element['uri']['#description'] = $this->t('This must be an internal path such as %add-node. You can also start typing the title of a piece of content to select it. Enter %front to link to the front page. Enter %nolink to display link text only. Enter %button to display keyboard-accessible link text only.', ['%add-node' => '/node/add', '%front' => '<front>', '%nolink' => '<nolink>', '%button' => '<button>']); + $element['uri']['#description'] = $this->t('This must be an internal path such as %add-node. You can also start typing the title of a piece of content to select it. Enter %front to link to the front page.', ['%add-node' => '/node/add', '%front' => '<front>']); } // If the field is configured to allow both internal and external links, // show a useful description. elseif ($this->supportsExternalLinks() && $this->supportsInternalLinks()) { - $element['uri']['#description'] = $this->t('Start typing the title of a piece of content to select it. You can also enter an internal path such as %add-node or an external URL such as %url. Enter %front to link to the front page. Enter %nolink to display link text only. Enter %button to display keyboard-accessible link text only.', ['%front' => '<front>', '%add-node' => '/node/add', '%url' => 'http://example.com', '%nolink' => '<nolink>', '%button' => '<button>']); + $element['uri']['#description'] = $this->t('Start typing the title of a piece of content to select it. You can also enter an internal path such as %add-node or an external URL such as %url. Enter %front to link to the front page.', ['%front' => '<front>', '%add-node' => '/node/add', '%url' => 'http://example.com']); } // If the field is configured to allow only external links, show a useful // description. -- GitLab