Commit 1f97aeb5 authored by Jess's avatar Jess
Browse files

Issue #2474469 by Mac_Weber, rootwork, xjm: Add help text to the option "internal links only"

parent 51bac452
......@@ -193,9 +193,10 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen
// 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.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment