Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / path / path.es6.js
1 /**
2  * @file
3  * Attaches behaviors for the Path module.
4  */
5 (function($, Drupal) {
6   /**
7    * Behaviors for settings summaries on path edit forms.
8    *
9    * @type {Drupal~behavior}
10    *
11    * @prop {Drupal~behaviorAttach} attach
12    *   Attaches summary behavior on path edit forms.
13    */
14   Drupal.behaviors.pathDetailsSummaries = {
15     attach(context) {
16       $(context)
17         .find('.path-form')
18         .drupalSetSummary(context => {
19           const path = $('.js-form-item-path-0-alias input').val();
20
21           return path
22             ? Drupal.t('Alias: @alias', { '@alias': path })
23             : Drupal.t('No alias');
24         });
25     },
26   };
27 })(jQuery, Drupal);