X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki.special.block.js;h=255b878adf4b31070163f123c71e823b4240ffca;hb=ce54089bdf6020c4dd7dc5d1d3c54f11b7f9fefc;hp=441b1d60738b90bdfe0e4ee8116c4bee5c4bc950;hpb=0833cae960f3360c1e2208122ed17dae08e24a90;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki.special.block.js b/resources/src/mediawiki.special.block.js index 441b1d6073..255b878adf 100644 --- a/resources/src/mediawiki.special.block.js +++ b/resources/src/mediawiki.special.block.js @@ -20,6 +20,7 @@ watchUserField = infuseIfExists( $( '#mw-input-wpWatch' ).closest( '.oo-ui-fieldLayout' ) ), expiryWidget = infuseIfExists( $( '#mw-input-wpExpiry' ) ), editingRestrictionWidget = infuseIfExists( $( '#mw-input-wpEditingRestriction' ) ), + preventTalkPageEdit = infuseIfExists( $( '#mw-input-wpDisableUTEdit' ) ), pageRestrictionsWidget = infuseIfExists( $( '#mw-input-wpPageRestrictions' ) ); function updateBlockOptions() { @@ -49,6 +50,17 @@ if ( pageRestrictionsWidget ) { pageRestrictionsWidget.setDisabled( editingRestrictionValue === 'sitewide' ); } + if ( preventTalkPageEdit ) { + // TODO: (T210475) this option is disabled for partial blocks unless + // a namespace restriction for User_talk namespace is in place. + // This needs to be updated once Namespace restrictions is available + if ( editingRestrictionValue === 'partial' ) { + preventTalkPageEdit.setDisabled( true ); + } else { + preventTalkPageEdit.setDisabled( false ); + } + } + } if ( blockTargetWidget ) {