3 * Javascript for the media bundle form.
6 (function ($, Drupal) {
10 * Behaviors for setting summaries on media bundle form.
12 * @type {Drupal~behavior}
14 * @prop {Drupal~behaviorAttach} attach
15 * Attaches summary behaviors on media bundle edit forms.
17 Drupal.behaviors.contentTypes = {
18 attach: function (context) {
19 var $context = $(context);
20 // Provide the vertical tab summaries.
21 $context.find('#edit-workflow').drupalSetSummary(function (context) {
23 $(context).find('input[name^="options"]:checked').parent().each(function () {
24 vals.push(Drupal.checkPlain($(this).find('label').text()));
26 if (!$(context).find('#edit-options-status').is(':checked')) {
27 vals.unshift(Drupal.t('Not published'));
29 return vals.join(', ');
31 $('#edit-language', context).drupalSetSummary(function (context) {
34 vals.push($('.js-form-item-language-configuration-langcode select option:selected', context).text());
36 $('input:checked', context).next('label').each(function () {
37 vals.push(Drupal.checkPlain($(this).text()));
40 return vals.join(', ');