diff options
Diffstat (limited to 'skins/common/block.js')
-rw-r--r-- | skins/common/block.js | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/skins/common/block.js b/skins/common/block.js index 430c1d54..78ae3bf2 100644 --- a/skins/common/block.js +++ b/skins/common/block.js @@ -1,4 +1,3 @@ - function considerChangingExpiryFocus() { if (!document.getElementById) { return; @@ -31,23 +30,23 @@ function updateBlockOptions() { 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' : ''; + if( anonymousRow ) { + anonymousRow.style.display = (!isIp && !isEmpty) ? 'none' : ''; + } var autoblockRow = document.getElementById('wpEnableAutoblockRow'); - autoblockRow.style.display = isIp && !isEmpty ? 'none' : ''; + if( autoblockRow ) { + autoblockRow.style.display = isIp && !isEmpty ? 'none' : ''; + } var emailblockRow = document.getElementById('wpEnableEmailBan'); - emailblockRow.style.display = isIp && !isEmpty ? 'none' : ''; + if( emailblockRow ) { + emailblockRow.style.display = isIp && !isEmpty ? 'none' : ''; + } + + var hideuserRow = document.getElementById('wpEnableHideUser'); + if( hideuserRow ) { + hideuserRow.style.display = isIp && !isEmpty ? 'none' : ''; + } } |