summaryrefslogtreecommitdiffstats
path: root/source/web/swat.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2001-06-23 15:01:34 +0000
committerSimo Sorce <idra@samba.org>2001-06-23 15:01:34 +0000
commit26ab608c91c7357df3a79bc34111194f115de005 (patch)
tree827c40a34c78d8ffa9b6165014e24ab9652d9b3f /source/web/swat.c
parent1959864490e79756257ba10431b188de78b8c8a7 (diff)
downloadsamba-26ab608c91c7357df3a79bc34111194f115de005.tar.gz
samba-26ab608c91c7357df3a79bc34111194f115de005.tar.xz
samba-26ab608c91c7357df3a79bc34111194f115de005.zip
handle P_LIST parameters
Diffstat (limited to 'source/web/swat.c')
-rw-r--r--source/web/swat.c25
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;