Do not show blockemail checkbox when blocking an IP
authorRaimond Spekking <raymond@users.mediawiki.org>
Mon, 11 Jun 2007 10:07:17 +0000 (10:07 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Mon, 11 Jun 2007 10:07:17 +0000 (10:07 +0000)
includes/DefaultSettings.php
includes/SpecialBlockip.php
skins/common/block.js

index 87babba..9662bbe 100644 (file)
@@ -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:
index c02d3ec..0222094 100644 (file)
@@ -245,7 +245,7 @@ class IPBlockForm {
 
                if ( $wgSysopEmailBans && $wgUser->isAllowed( 'blockemail' ) ) {
                        $wgOut->addHTML("
-                       <tr>
+                       <tr id='wpEnableEmailBan'>
                        <td>&nbsp;</td>
                                <td>
                                        " . wfCheckLabel( wfMsgHtml( 'ipbemailban' ),
index c9c0244..430c1d5 100644 (file)
@@ -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' : '';
 }