2 * JavaScript for Special:UserRights
5 var convertmessagebox
= require( 'mediawiki.notification.convertmessagebox' );
6 // Replace successbox with notifications
9 // Dynamically show/hide the expiry selection underneath each checkbox
10 $( '#mw-userrights-form2 input[type=checkbox]' ).on( 'change', function ( e
) {
11 $( '#mw-userrights-nested-' + e
.target
.id
).toggle( e
.target
.checked
);
12 } ).trigger( 'change' );
14 // Also dynamically show/hide the "other time" input under each dropdown
15 $( '.mw-userrights-nested select' ).on( 'change', function ( e
) {
16 $( e
.target
.parentNode
).find( 'input' ).toggle( $( e
.target
).val() === 'other' );
17 } ).trigger( 'change' );