/**
- * @file
- * Javascript for the node content editing form.
- */
+* DO NOT EDIT THIS FILE.
+* See the following change record for more information,
+* https://www.drupal.org/node/2815083
+* @preserve
+**/
(function ($, Drupal) {
-
- 'use strict';
-
- /**
- * Behaviors for setting summaries on content type form.
- *
- * @type {Drupal~behavior}
- *
- * @prop {Drupal~behaviorAttach} attach
- * Attaches summary behaviors on content type edit forms.
- */
Drupal.behaviors.contentTypes = {
- attach: function (context) {
+ attach: function attach(context) {
var $context = $(context);
- // Provide the vertical tab summaries.
+
$context.find('#edit-submission').drupalSetSummary(function (context) {
var vals = [];
vals.push(Drupal.checkPlain($(context).find('#edit-title-label').val()) || Drupal.t('Requires a title'));
});
$context.find('#edit-workflow').drupalSetSummary(function (context) {
var vals = [];
- $(context).find('input[name^="options"]:checked').parent().each(function () {
+ $(context).find('input[name^="options"]:checked').next('label').each(function () {
vals.push(Drupal.checkPlain($(this).text()));
});
if (!$(context).find('#edit-options-status').is(':checked')) {
});
}
};
-
-})(jQuery, Drupal);
+})(jQuery, Drupal);
\ No newline at end of file