cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci/cluster validate_fence.js
Date: 26 Jul 2007 04:14:15 -0000	[thread overview]
Message-ID: <20070726041415.16103.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL5
Changes by:	rmccabe at 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);



             reply	other threads:[~2007-07-26  4:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-26  4:14 rmccabe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-04-23 17:23 [Cluster-devel] conga/luci/cluster validate_fence.js rmccabe
2007-07-23 15:09 rmccabe
2007-02-16 23:26 rmccabe
2007-02-16 23:25 rmccabe
2006-10-04 17:25 kupcevic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070726041415.16103.qmail@sourceware.org \
    --to=rmccabe@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).