Bug 105480 - Use the friendly name from the fielddefs table when reporting strictvalue errors if it's available.

Patch by James A. Laska <jlaska@us.ibm.com>
r= justdave@syndicomm.com, jake@acutex.net
This commit is contained in:
jake%acutex.net 2001-10-20 00:50:27 +00:00
parent 063be9f0fa
commit 675c319ea2

View File

@ -208,8 +208,15 @@ sub CheckFormField (\%$;\@) {
(defined($legalsRef) &&
lsearch($legalsRef, $formRef->{$fieldname})<0) ){
print "A legal $fieldname was not set; ";
print Param("browserbugmessage");
SendSQL("SELECT description FROM fielddefs WHERE name=" . SqlQuote($fieldname));
my $result = FetchOneColumn();
if ($result) {
PuntTryAgain("A legal $result was not set.");
}
else {
PuntTryAgain("A legal $fieldname was not set.");
print Param("browserbugmessage");
}
PutFooter();
exit 0;
}