mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-24 04:10:57 -05:00
This commit changes the form that the user sees when inviting or editing another user, if the service has the ‘caseworking’ permission set. This will allow creating a new type of user, one who only has the `send_messages` permission, without the `view_activity` permission. We are doing this because we think there are a number of services with a lot of users who don’t need to see the dashboard, or the other team members, and that we can make a simpler interface for these users.
26 lines
583 B
JavaScript
26 lines
583 B
JavaScript
(function(Modules) {
|
|
"use strict";
|
|
|
|
Modules.ConditionalRadios = function() {
|
|
|
|
this.start = function(component) {
|
|
|
|
const $radios = $('[type=radio]', $(component)),
|
|
showHidePanels = function() {
|
|
$radios.each(function() {
|
|
$('#panel-' + $(this).attr('value'))
|
|
.toggleClass(
|
|
'js-hidden',
|
|
!$(this).is(":checked")
|
|
);
|
|
});
|
|
};
|
|
|
|
$radios.on('click', showHidePanels);
|
|
showHidePanels();
|
|
|
|
};
|
|
};
|
|
|
|
})(window.GOVUK.Modules);
|