reasonCodePointLimit = mw.config.get( 'wgCommentCodePointLimit' ),
reasonByteLimit = mw.config.get( 'wgCommentByteLimit' );
reasonCodePointLimit = mw.config.get( 'wgCommentCodePointLimit' ),
reasonByteLimit = mw.config.get( 'wgCommentByteLimit' );
- if ( mw.config.get( 'wgCascadeableLevels' ) !== undefined ) {
- $( 'form#mw-Protect-Form' ).submit( this.toggleUnchainedInputs.bind( ProtectionForm, true ) );
- }
+ $( 'form#mw-Protect-Form' ).on( 'submit', this.toggleUnchainedInputs.bind( ProtectionForm, true ) );
} );
this.getExpiryInputs().each( function () {
$( this ).on( 'keyup change', ProtectionForm.updateExpiry.bind( ProtectionForm, this ) );
} );
this.getLevelSelectors().each( function () {
} );
this.getExpiryInputs().each( function () {
$( this ).on( 'keyup change', ProtectionForm.updateExpiry.bind( ProtectionForm, this ) );
} );
this.getLevelSelectors().each( function () {
.prop( 'checked', !this.areAllTypesMatching() ),
document.createTextNode( ' ' ),
$( '<label>' )
.prop( 'checked', !this.areAllTypesMatching() ),
document.createTextNode( ' ' ),
$( '<label>' )
- var cascadeableLevels = mw.config.get( 'wgCascadeableLevels' );
-
- if ( !Array.isArray( cascadeableLevels ) ) {
- return false;
- }
-
- return cascadeableLevels.indexOf( level ) !== -1;
+ return config.CascadingRestrictionLevels.indexOf( level ) !== -1;
return $.map( objects, function ( object ) {
return object[ attrName ];
} ).filter( function ( item, index, a ) {
return $.map( objects, function ( object ) {
return object[ attrName ];
} ).filter( function ( item, index, a ) {
this.getLevelSelectors().slice( 1 ).each( setDisabled );
this.getExpiryInputs().slice( 1 ).each( setDisabled );
this.getExpirySelectors().slice( 1 ).each( setDisabled );
this.getLevelSelectors().slice( 1 ).each( setDisabled );
this.getExpiryInputs().slice( 1 ).each( setDisabled );
this.getExpirySelectors().slice( 1 ).each( setDisabled );