Skip to contentSkip to conversation

conga/luci/cluster validate_config_gulm.js

Cluster-devel [email protected] 1 participant 1 message Jan 22, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2007-01-22 21:19:29

Added files:
luci/cluster : validate_config_gulm.js

Log message:
GULM properties

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_config_gulm.js.diff?cvsroot=cluster&r1=NONE&r2=1.1

/cvs/cluster/conga/luci/cluster/validate_config_gulm.js,v --> standard output revision 1.1

- renamed from luci/cluster/validate_config_gulm.js +23 -0
@@ -0,0 +1,23 @@
+function validate_form(form) {
+	var errors = new Array();
+	var lscount = 0;
+
+	var elem = form.getElementsByTagName('input');
+	for (var i = 0 ; i < elem.length ; i++) {
+		if (elem[i].type != 'checkbox')
+			continue;
+		if (elem[i].checked)
+			lscount++;
+	}
+
+	if (lscount != 1 && lscount != 3 && lscount != 4 && lscount != 5)
+		errors.push('You must have exactly 1, 3, 4, or 5 GULM lockservers.');
+
+	if (error_dialog(errors))
+		return (-1);
+
+	if (confirm('Update GULM properties?'))
+		form.submit();
+
+	return (0);
+}