Move floodprotection js out of .tmpl

This commit is contained in:
Alexey Sokolov
2012-04-01 12:39:14 +07:00
parent 1a8455b2b9
commit ce6a9ce327
2 changed files with 14 additions and 14 deletions
+13
View File
@@ -0,0 +1,13 @@
function floodprotection_change() {
var protection = document.getElementById('floodprotection_checkbox');
var rate = document.getElementById('floodrate');
var burst = document.getElementById('floodburst');
if (protection.checked) {
rate.removeAttribute('disabled');
burst.removeAttribute('disabled');
} else {
rate.disabled = 'disabled';
burst.disabled = 'disabled';
}
}