type_form.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /**
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/2815083
  5. * @preserve
  6. **/
  7. (function ($, Drupal) {
  8. Drupal.behaviors.mediaTypeFormSummaries = {
  9. attach: function attach(context) {
  10. var $context = $(context);
  11. $context.find('#edit-workflow').drupalSetSummary(function (context) {
  12. var vals = [];
  13. $(context).find('input[name^="options"]:checked').parent().each(function () {
  14. vals.push(Drupal.checkPlain($(this).find('label').text()));
  15. });
  16. if (!$(context).find('#edit-options-status').is(':checked')) {
  17. vals.unshift(Drupal.t('Not published'));
  18. }
  19. return vals.join(', ');
  20. });
  21. $(context).find('#edit-language').drupalSetSummary(function (context) {
  22. var vals = [];
  23. vals.push($(context).find('.js-form-item-language-configuration-langcode select option:selected').text());
  24. $(context).find('input:checked').next('label').each(function () {
  25. vals.push(Drupal.checkPlain($(this).text()));
  26. });
  27. return vals.join(', ');
  28. });
  29. }
  30. };
  31. })(jQuery, Drupal);