1234567891011121314151617181920212223 |
- (function ($) {
- 'use strict';
- Drupal.FieldGroup = Drupal.FieldGroup || {};
- Drupal.FieldGroup.Effects = Drupal.FieldGroup.Effects || {};
- /**
- * This script adds the required and error classes to the details wrapper.
- */
- Drupal.behaviors.fieldGroupDetails = {
- attach: function (context) {
- $(context).find('.field-group-details').once('field-group-details').each(function () {
- var $this = $(this);
- if ($this.is('.required-fields') && ($this.find('[required]').length > 0 || $this.find('.form-required').length > 0)) {
- $('summary', $this).first().addClass('form-required');
- }
- });
- }
- };
- })(jQuery);
|