Skip to content
Snippets Groups Projects

Issue #3038365: Add the EntityOwnerInterface to BlockContent Entity

7 files
+ 194
1
Compare changes
  • Side-by-side
  • Inline
Files
7
+ 29
0
/**
* @file
* Defines Javascript behaviors for the block content form.
*/
(function ($, Drupal) {
/**
* Behaviors for summaries for tabs in the block content edit form.
*
* @type {Drupal~behavior}
*
* @prop {Drupal~behaviorAttach} attach
* Attaches summary behavior for tabs in the block content edit form.
*/
Drupal.behaviors.blockContentFormSummaries = {
attach(context) {
const $context = $(context);
$context.find('.block-content-form-author').drupalSetSummary(context => {
const $authorContext = $(context);
const name = $authorContext.find('.field--name-uid input').val();
if (name) {
return Drupal.t('By @name', {'@name': name});
}
});
},
};
})(jQuery, Drupal);
Loading