1/** 2 * @file 3 * JavaScript behaviors for radio buttons. 4 */ 5 6(function ($, Drupal) { 7 8 'use strict'; 9 10 /** 11 * Adds HTML5 validation to required radios buttons. 12 * 13 * @type {Drupal~behavior} 14 * 15 * @see Issue #2856795: If radio buttons are required but not filled form is nevertheless submitted. 16 */ 17 Drupal.behaviors.webformRadiosRequired = { 18 attach: function (context) { 19 $('.js-webform-type-radios[required="required"], .js-form-type-webform-radios-other[required="required"]', context).each(function () { 20 $(this).find('input[type="radio"]').attr({'required': 'required', 'aria-required': 'true'}); 21 }); 22 } 23 }; 24 25})(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.