From 12379bf1ed06a21678e606ce13612cca578d568f Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Mon, 11 Jun 2007 10:07:17 +0000 Subject: [PATCH] Do not show blockemail checkbox when blocking an IP --- includes/DefaultSettings.php | 2 +- includes/SpecialBlockip.php | 2 +- skins/common/block.js | 16 +++++++++++----- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 87babba0bf..9662bbeae2 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1182,7 +1182,7 @@ $wgCacheEpoch = '20030516000000'; * to ensure that client-side caches don't keep obsolete copies of global * styles. */ -$wgStyleVersion = '75'; +$wgStyleVersion = '76'; # Server-side caching: diff --git a/includes/SpecialBlockip.php b/includes/SpecialBlockip.php index c02d3ec714..0222094f25 100644 --- a/includes/SpecialBlockip.php +++ b/includes/SpecialBlockip.php @@ -245,7 +245,7 @@ class IPBlockForm { if ( $wgSysopEmailBans && $wgUser->isAllowed( 'blockemail' ) ) { $wgOut->addHTML(" - +   " . wfCheckLabel( wfMsgHtml( 'ipbemailban' ), diff --git a/skins/common/block.js b/skins/common/block.js index c9c024468a..430c1d54d3 100644 --- a/skins/common/block.js +++ b/skins/common/block.js @@ -22,26 +22,32 @@ function considerChangingExpiryFocus() { function updateBlockOptions() { if (!document.getElementById) return; - + var target = document.getElementById('mw-bi-target'); if (!target) return; - + var addy = target.value; var isEmpty = addy.match(/^\s*$/); var isIp = addy.match(/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|:(:[0-9A-Fa-f]{1,4}){1,7}|[0-9A-Fa-f]{1,4}(:{1,2}[0-9A-Fa-f]{1,4}|::$){1,7})(\/\d+)?$/); - + /* var anonymousCheck = document.getElementById('wpAnonOnly'); anonymousCheck.disabled = !isIp && !isEmpty; - + var autoblockCheck = document.getElementById('wpEnableAutoblock'); autoblockCheck.disabled = isIp && !isEmpty; + + var emailblockCheck = document.getElementById('wpEmailBan'); + emailblockCheck.disabled = isIp && !isEmpty; */ var anonymousRow = document.getElementById('wpAnonOnlyRow'); anonymousRow.style.display = (!isIp && !isEmpty) ? 'none' : ''; - + var autoblockRow = document.getElementById('wpEnableAutoblockRow'); autoblockRow.style.display = isIp && !isEmpty ? 'none' : ''; + + var emailblockRow = document.getElementById('wpEnableEmailBan'); + emailblockRow.style.display = isIp && !isEmpty ? 'none' : ''; } -- 2.20.1