3 * Defines JavaScript behaviors for the media type form.
8 * Behaviors for setting summaries on media type form.
10 * @type {Drupal~behavior}
12 * @prop {Drupal~behaviorAttach} attach
13 * Attaches summary behaviors on media type edit forms.
15 Drupal.behaviors.mediaTypeFormSummaries = {
17 const $context = $(context);
18 // Provide the vertical tab summaries.
19 $context.find('#edit-workflow').drupalSetSummary(context => {
22 .find('input[name^="options"]:checked')
35 .find('#edit-options-status')
38 vals.unshift(Drupal.t('Not published'));
40 return vals.join(', ');
43 .find('#edit-language')
44 .drupalSetSummary(context => {
50 '.js-form-item-language-configuration-langcode select option:selected',
56 .find('input:checked')
59 vals.push(Drupal.checkPlain($(this).text()));
62 return vals.join(', ');