blob: af54d92a9c9e064d6fafb4ce36f6e12ef3ffff43 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
/**
* @file
* Attaches comment behaviors to the entity form.
*/
(function ($, Drupal) {
/**
*
* @type {Drupal~behavior}
*/
Drupal.behaviors.commentFieldsetSummaries = {
attach(context) {
const $context = $(context);
$context
.find('fieldset.comment-entity-settings-form')
.drupalSetSummary((context) =>
Drupal.checkPlain(
$(context)
.find('.js-form-item-comment input:checked')
.next('label')[0].textContent,
),
);
},
};
})(jQuery, Drupal);
|