Security update to Drupal 8.4.6
[yaffs-website] / web / core / misc / entity-form.js
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
8 (function ($, Drupal) {
9   Drupal.behaviors.entityContentDetailsSummaries = {
10     attach: function attach(context) {
11       var $context = $(context);
12       $context.find('.entity-content-form-revision-information').drupalSetSummary(function (context) {
13         var $revisionContext = $(context);
14         var revisionCheckbox = $revisionContext.find('.js-form-item-revision input');
15
16         if (revisionCheckbox.is(':checked') || !revisionCheckbox.length && $revisionContext.find('.js-form-item-revision-log textarea').length) {
17           return Drupal.t('New revision');
18         }
19
20         return Drupal.t('No revision');
21       });
22
23       $context.find('details.entity-translation-options').drupalSetSummary(function (context) {
24         var $translationContext = $(context);
25         var translate = void 0;
26         var $checkbox = $translationContext.find('.js-form-item-translation-translate input');
27
28         if ($checkbox.length) {
29           translate = $checkbox.is(':checked') ? Drupal.t('Needs to be updated') : Drupal.t('Does not need to be updated');
30         } else {
31           $checkbox = $translationContext.find('.js-form-item-translation-retranslate input');
32           translate = $checkbox.is(':checked') ? Drupal.t('Flag other translations as outdated') : Drupal.t('Do not flag other translations as outdated');
33         }
34
35         return translate;
36       });
37     }
38   };
39 })(jQuery, Drupal);