summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/jscripts
diff options
context:
space:
mode:
Diffstat (limited to 'admin/WebConsole/jscripts')
-rw-r--r--admin/WebConsole/jscripts/propiedades_aulas.js11
-rw-r--r--admin/WebConsole/jscripts/validators.js11
2 files changed, 20 insertions, 2 deletions
diff --git a/admin/WebConsole/jscripts/propiedades_aulas.js b/admin/WebConsole/jscripts/propiedades_aulas.js
index 86b13256..61126a6f 100644
--- a/admin/WebConsole/jscripts/propiedades_aulas.js
+++ b/admin/WebConsole/jscripts/propiedades_aulas.js
@@ -102,8 +102,15 @@ function comprobar_datos(){
var form = document.fdatos;
return validate (form.nombreaula, validate_notnull, 0) &&
- validate (form.puestos, validate_notnull, 1) &&
- validate (form.velmul, validate_number, 4);
+ validate (form.puestos, validate_number_notnull, 1) &&
+ validate (form.router, validate_ipadress_notnull, 4) &&
+ validate (form.netmask, validate_ipadress_notnull, 5) &&
+ validate (form.modp2p, validate_notnull, 6) &&
+ validate (form.timep2p, validate_number_notnull, 7) &&
+ validate (form.modomul, validate_notnull, 8) &&
+ validate (form.ipmul, validate_ipadress_notnull, 9) &&
+ validate (form.pormul, validate_notnull, 10) &&
+ validate (form.velmul, validate_number_notnull, 11);
return(true);
}
diff --git a/admin/WebConsole/jscripts/validators.js b/admin/WebConsole/jscripts/validators.js
index f99f9ff7..4fc91c75 100644
--- a/admin/WebConsole/jscripts/validators.js
+++ b/admin/WebConsole/jscripts/validators.js
@@ -42,6 +42,17 @@ function validate_alphanum_notnull(value) {
return validate_number(value) && validate_notnull(value);
}
+
+function validate_ipadress(value) {
+ return validate_expr(value, "^\\d+\\.\\d+\.\\d+\\.\\d+$");
+}
+
+function validate_ipadress_notnull(value) {
+ return validate_ipadress(value) && validate_notnull(value);
+}
+
+
+
function validation_highlight(field) {
field.focus();
field.style.border = "1px solid red";