diff options
author | Simo Sorce <idra@samba.org> | 2001-06-23 15:01:34 +0000 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2001-06-23 15:01:34 +0000 |
commit | 5be670074e908781ff67d3cbbce35b3e61b2058a (patch) | |
tree | b5fdaf4aadcd7a7d67aa8fb11c7122bde09e23d3 /source3/web | |
parent | 6ad1fcc2799d9cccbe22c271650118e065e5be3c (diff) | |
download | samba-5be670074e908781ff67d3cbbce35b3e61b2058a.tar.gz samba-5be670074e908781ff67d3cbbce35b3e61b2058a.tar.bz2 samba-5be670074e908781ff67d3cbbce35b3e61b2058a.zip |
handle P_LIST parameters
(This used to be commit 26ab608c91c7357df3a79bc34111194f115de005)
Diffstat (limited to 'source3/web')
-rw-r--r-- | source3/web/swat.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/source3/web/swat.c b/source3/web/swat.c index 71239d5681..262e7ef4c8 100644 --- a/source3/web/swat.c +++ b/source3/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; |