diff --git a/core/modules/text/lib/Drupal/text/Plugin/field/widget/TextareaWithSummaryWidget.php b/core/modules/text/lib/Drupal/text/Plugin/field/widget/TextareaWithSummaryWidget.php index 6c0e534..6a10b2c 100644 --- a/core/modules/text/lib/Drupal/text/Plugin/field/widget/TextareaWithSummaryWidget.php +++ b/core/modules/text/lib/Drupal/text/Plugin/field/widget/TextareaWithSummaryWidget.php @@ -43,7 +43,7 @@ function formElement(array $items, $delta, array $element, $langcode, array &$fo '#default_value' => isset($items[$delta]['summary']) ? $items[$delta]['summary'] : NULL, '#title' => t('Summary'), '#rows' => $this->getSetting('summary_rows'), - '#description' => t('Leave blank to use trimmed value of full text as the summary.'), + '#description' => empty($this->instance['settings']['required_summary']) ? t('Leave blank to use trimmed value of full text as the summary.') : '', '#attached' => array( 'library' => array(array('text', 'drupal.text')), ), @@ -55,7 +55,7 @@ function formElement(array $items, $delta, array $element, $langcode, array &$fo ); if (empty($this->instance['settings']['show_summary'])) { - $element['summary']['#attached']['js'] = array(drupal_get_path('module', 'text') . '/text.js'); + $element['summary']['#attached']['library'] = array(array('text', 'drupal.text')); } return $element;