summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxjm2016-11-13 05:10:49 (GMT)
committerxjm2016-11-13 05:10:49 (GMT)
commit1f97aeb5f2701a7edb116698dc6c05e51285fbe7 (patch)
tree544c688a9ea29a60ced4f81f9285a19553ab6568
parent51bac4521f76510cbc3eb019cc945c74ce987337 (diff)
Issue #2474469 by Mac_Weber, rootwork, xjm: Add help text to the option "internal links only"
-rw-r--r--core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php b/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php
index fd670fd..9af176c 100644
--- a/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php
+++ b/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php
@@ -193,9 +193,10 @@ class LinkWidget extends WidgetBase {
}
// If the field is configured to allow only internal links, add a useful
- // element prefix.
+ // element prefix and description.
if (!$this->supportsExternalLinks()) {
$element['uri']['#field_prefix'] = rtrim(\Drupal::url('<front>', array(), array('absolute' => TRUE)), '/');
+ $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.', array('%add-node' => '/node/add', '%front' => '<front>'));
}
// If the field is configured to allow both internal and external links,
// show a useful description.