1/** 2 * @file 3 * JavaScript behaviors for custom webform #states. 4 */ 5 6(function ($, Drupal) { 7 8 'use strict'; 9 10 $(document).on('state:required', function (e) { 11 if (e.trigger && $(e.target).isWebform()) { 12 var $target = $(e.target); 13 14 // @see Issue #2856315: Conditional Logic - Requiring Radios in a Fieldset. 15 // Fix #required for fieldsets. 16 if ($target.is('.js-form-wrapper.panel')) { 17 if (e.value) { 18 $target.find('.panel-heading .panel-title').addClass('js-form-required form-required'); 19 } 20 else { 21 $target.find('.panel-heading .panel-title').removeClass('js-form-required form-required'); 22 } 23 } 24 25 } 26 }); 27 28})(jQuery, Drupal);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.