comment-entity-form.es6.js 568 B

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