[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] conga/luci/cluster validate_fence.js



CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL5
Changes by:	rmccabe sourceware org	2007-07-26 04:14:15

Modified files:
	luci/cluster   : validate_fence.js 

Log message:
	Fix the frontend to allow spaces as a fence password (part of the fix for 249097)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_fence.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.4&r2=1.1.2.5

--- conga/luci/cluster/validate_fence.js	2007/07/23 15:09:17	1.1.2.4
+++ conga/luci/cluster/validate_fence.js	2007/07/26 04:14:14	1.1.2.5
@@ -51,12 +51,22 @@
 }
 
 function validate_field_passwd(form, form_elem) {
+	var errors = [];
 	if (form_elem.disabled) {
 		clr_form_err(form_elem);
 		return (null);
 	}
 
-	var errors = validate_field_str(form, form_elem);
+	if (!form_elem || !form_elem.value) {
+		if (!form_elem) {
+			errors.push('No value was given for this field.');
+		} else {
+			set_form_err(form_elem);
+			errors.push(form_elem.name + ' values must not be empty.');
+		}
+		return (errors);
+	}
+
 	if (errors && errors.length > 0 && form.passwd_script && !str_is_blank(form.passwd_script.value))
 	{
 		clr_form_err(form_elem);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]