diff options
author | Erik Kristensen <ekristen@pfsense.org> | 2005-08-07 20:04:43 +0000 |
---|---|---|
committer | Erik Kristensen <ekristen@pfsense.org> | 2005-08-07 20:04:43 +0000 |
commit | 088748120cdc1bd67ff9ce3949a0178671bf18a4 (patch) | |
tree | 1f96ec08ad4bba69c43d7921fb52d679549eb16d /usr/local | |
parent | 6093dcfc55b69fb1e6e036edb553f95949f37583 (diff) | |
download | pfsense-088748120cdc1bd67ff9ce3949a0178671bf18a4.zip pfsense-088748120cdc1bd67ff9ce3949a0178671bf18a4.tar.gz |
Verifies Required Fields Are Filled Out
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/pool.js | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/usr/local/www/pool.js b/usr/local/www/pool.js index befbc02..2b4f7cd 100755 --- a/usr/local/www/pool.js +++ b/usr/local/www/pool.js @@ -1,6 +1,23 @@ function AddServerToPool(form) { + + var theSel = form['servers[]']; + for(i=theSel.length-1; i>=0; i--) + { + if(theSel.options[i].value == form.ipaddr.value) { + alert("IP Address Already In List"); + return true; + } + } + + if (form.type.selectedIndex == 1) { + if (!form.monitorip.value) { + alert("Monitor IP Required First!"); + return true; + } + } + var ServerPort=form.ipaddr.value; - if(form.type.selectedIndex == 2) + if(form.type.selectedIndex == 0) var ServerPort=form.ipaddr.value; else var ServerPort=form.ipaddr.value + "|" + form.monitorip.value; |