added entire form validation for network.sh
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Mon, 4 Jan 2010 00:02:07 +0000 (00:02 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Mon, 4 Jan 2010 00:02:07 +0000 (00:02 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@87 01035d8c-6547-0410-b346-abe4f91aad63

easy-asterisk-gui/network.js

index 6a6663c1908bf6cc3b93757d8ab4945955a9546f..6ba787b18ed960f7448544138bdbef5a2a6db7d2 100644 (file)
@@ -62,5 +62,10 @@ function localInit() {
 
 function validate_form(form)
 {
-    return true;
+    var valid = true;
+
+    if ($('dhcp').checked == false)
+       valid = isIP(form.ipaddress) && isIP(form.ipaddress) && isIP(form.gateway) && isIP(form.dns);
+
+    return valid;
 }