3 * Javascript for the node content editing form.
8 * Behaviors for setting summaries on content type form.
10 * @type {Drupal~behavior}
12 * @prop {Drupal~behaviorAttach} attach
13 * Attaches summary behaviors on content type edit forms.
15 Drupal.behaviors.contentTypes = {
17 const $context = $(context);
18 // Provide the vertical tab summaries.
19 $context.find('#edit-submission').drupalSetSummary(context => {
24 .find('#edit-title-label')
26 ) || Drupal.t('Requires a title'),
28 return vals.join(', ');
30 $context.find('#edit-workflow').drupalSetSummary(context => {
33 .find('input[name^="options"]:checked')
36 vals.push(Drupal.checkPlain($(this).text()));
40 .find('#edit-options-status')
43 vals.unshift(Drupal.t('Not published'));
45 return vals.join(', ');
47 $('#edit-language', context).drupalSetSummary(context => {
52 '.js-form-item-language-configuration-langcode select option:selected',
57 $('input:checked', context)
60 vals.push(Drupal.checkPlain($(this).text()));
63 return vals.join(', ');
65 $context.find('#edit-display').drupalSetSummary(context => {
67 const $editContext = $(context);
69 .find('input:checked')
72 vals.push(Drupal.checkPlain($(this).text()));
74 if (!$editContext.find('#edit-display-submitted').is(':checked')) {
75 vals.unshift(Drupal.t("Don't display post information"));
77 return vals.join(', ');