diff options
-rw-r--r-- | source/web/swat.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/source/web/swat.c b/source/web/swat.c index 71239d56813..262e7ef4c85 100644 --- a/source/web/swat.c +++ b/source/web/swat.c @@ -180,6 +180,27 @@ static void show_parameter(int snum, struct parm_struct *parm) make_parm_name(parm->label),(char)(parm->def.cvalue)); break; + case P_LIST: + printf("<input type=text size=40 name=\"parm_%s\" value=\"", + make_parm_name(parm->label)); + if (ptr) { + char** list = ptr; + for (;*list;list++) { + printf("%s%s", *list, ((*(list+1))?" ":"")); + } + } + printf("\">"); + printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.value=\'", + make_parm_name(parm->label)); + if (parm->def.lvalue) { + char **list = parm->def.lvalue; + for (; *list; list++) { + printf("%s%s", *list, ((*(list+1))?" ":"")); + } + } + printf("\'\">"); + break; + case P_STRING: case P_USTRING: printf("<input type=text size=40 name=\"parm_%s\" value=\"%s\">", @@ -279,6 +300,10 @@ static void show_parameters(int snum, int allparameters, int advanced, int print if (*(char *)ptr == (char)(parm->def.cvalue)) continue; break; + case P_LIST: + if (!lp_list_compare(*(char ***)ptr,(char **)(parm->def.lvalue))) continue; + break; + case P_STRING: case P_USTRING: if (!strcmp(*(char **)ptr,(char *)(parm->def.svalue))) continue; |