Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / comment / comment-entity-form.es6.js
diff --git a/web/core/modules/comment/comment-entity-form.es6.js b/web/core/modules/comment/comment-entity-form.es6.js
new file mode 100644 (file)
index 0000000..00a3404
--- /dev/null
@@ -0,0 +1,17 @@
+/**
+ * @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').text()));
+    },
+  };
+}(jQuery, Drupal));