Hi everyone,
I'm using [a modded version of] ConcourseSuite 5 community. I noticed that if I want to add a relationship in an account, I got a weird behavior when I selected "Select Account". The account search dialog wouldn't yield correct results unless I specified or cleared both fields.
I discovered that it's because by default, the code would search on "Account Name" for "Account Name" and "Account Number" for "Account Number". In other words, any unused fields were not being cleared before the search was executed.
I've written a patch to fix this which I'll attach below. (There are two files, "mycfs_accounts_selector.jps" and "mycfs_accounts_selector2.jsp". I'm not sure the difference between them, so I applied the patch to both. Only one is shown below.)
Matt, if you could give me SVN access to the community trunk, I'd be happy to add such patches as I create them.
Thanks!
~Tom
Index: /home/hallmant/eclipse/dm-concourse/src/web/jsp/mycfs/mycfs_accounts_selector.jsp
=================================================================
--- /home/hallmant/eclipse/dm-concourse/src/web/jsp/mycfs/mycfs_accounts_selector.jsp (revision 3)
+++ /home/hallmant/eclipse/dm-concourse/src/web/jsp/mycfs/mycfs_accounts_selector.jsp (working copy)
@@ -59,6 +59,14 @@
}
}
}
+
+ function clearForSubmit()
+ if (document.acctListView.acctName.value == label("label.account.name", "Account Name"))
+ document.acctListView.acctName.value = "";
+ if (document.acctListView.acctNumber.value == label("label.account.number", "Account Number"))
+ document.acctListView.acctNumber.value = "";
+ }
+
</SCRIPT>
<%
if (!"true".equals(request.getParameter("finalsubmit")))
@@ -66,7 +74,7 @@
%>
<%-- Navigating the contact list, not the final submit --%>
<body onLoad="init()">
-<form name="acctListView" method="post" action="AccountSelector.do?command=ListAccounts">
+<form name="acctListView" method="post" onSubmit="clearForSubmit()" action="AccountSelector.do?command=ListAccounts">
<table cellpadding="6" cellspacing="0" width="100%" border="0">
<tr>
<td align="center" valign="center" bgcolor="#d3d1d1">