ecae787c893d6403a07425b9d9a718ad19af93f3
angie
  Wed Jan 5 09:16:47 2011 -0800
In cgiMakeCheckboxGroupWithVals, don't force the first item to bechecked when no checked items are specified -- let the caller control
the behavior.

diff --git src/lib/cheapcgi.c src/lib/cheapcgi.c
index 23ed05f..d338e3c 100644
--- src/lib/cheapcgi.c
+++ src/lib/cheapcgi.c
@@ -1591,31 +1591,30 @@
         selString = "";
     printf("<OPTION%s>%s</OPTION>\n", selString, menu[i]);
     }
 printf("</SELECT>\n");
 char buf[512];
 safef(buf, sizeof(buf), "%s%s", cgiMultListShadowPrefix(), name);
 cgiMakeHiddenVar(buf, "1");
 }
 
 void cgiMakeCheckboxGroupWithVals(char *name, char *menu[], char *values[], int menuSize,
 				  struct slName *checked, int tableColumns)
 /* Make a table of checkboxes that have the same variable name but different
  * values (same behavior as a multi-select input), with nice labels in menu[]. */
 {
 int i;
-if (checked == NULL) checked = slNameNew(menu[0]);
 if (values == NULL) values = menu;
 if (menu == NULL) menu = values;
 puts("<TABLE BORDERWIDTH=0><TR>");
 for (i = 0;  i < menuSize;  i++)
     {
     if (i > 0 && (i % tableColumns) == 0)
 	printf("</TR><TR>");
     printf("<TD><INPUT TYPE=CHECKBOX NAME=\"%s\" VALUE=\"%s\" %s> %s</TD>\n", name, values[i],
 	   (slNameInList(checked, values[i]) ? "CHECKED" : ""), menu[i]);
     }
 if ((i % tableColumns) != 0)
     while ((i++ % tableColumns) != 0)
 	printf("<TD></TD>");
 puts("</TR></TABLE>");
 char buf[512];