-
Notifications
You must be signed in to change notification settings - Fork 0
/
d8ux.js
28 lines (23 loc) · 889 Bytes
/
d8ux.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
(function ($) {
Drupal.behaviors.userFieldsetSummaries = {
attach: function (context) {
$('fieldset.d8ux-user-form-account-roles-status', context).drupalSetSummary(function (context) {
var vals = [];
$('input:checked', context).parent().each(function () {
vals.push(Drupal.checkPlain($.trim($(this).text())));
});
return vals.join(', ');
});
$('fieldset.d8ux-user-form-administrative-overlay', context).drupalSetSummary(function (context) {
return $('.form-item-overlay input', context).is(':checked') ?
Drupal.t('Enabled') :
Drupal.t('Disabled');
});
$('fieldset.d8ux-user-form-personal-contact-form', context).drupalSetSummary(function (context) {
return $('.form-item-contact input', context).is(':checked') ?
Drupal.t('Enabled') :
Drupal.t('Disabled');
});
}
};
})(jQuery);