From ce6a9ce327cf91db6f94e47ec88655f45b393d0b Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sun, 1 Apr 2012 12:39:14 +0700 Subject: [PATCH] Move floodprotection js out of .tmpl --- modules/data/webadmin/files/webadmin.js | 13 +++++++++++++ modules/data/webadmin/tmpl/add_edit_network.tmpl | 15 +-------------- 2 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 modules/data/webadmin/files/webadmin.js diff --git a/modules/data/webadmin/files/webadmin.js b/modules/data/webadmin/files/webadmin.js new file mode 100644 index 0000000000..4658620a6c --- /dev/null +++ b/modules/data/webadmin/files/webadmin.js @@ -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'; + } +} + diff --git a/modules/data/webadmin/tmpl/add_edit_network.tmpl b/modules/data/webadmin/tmpl/add_edit_network.tmpl index 0ed7a8ede6..a7b1edd568 100644 --- a/modules/data/webadmin/tmpl/add_edit_network.tmpl +++ b/modules/data/webadmin/tmpl/add_edit_network.tmpl @@ -1,3 +1,4 @@ + @@ -58,20 +59,6 @@
One server per line, host [[+]port] [password] -
Flood protection: