summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJohn Terpstra <jht@samba.org>2003-07-26 16:56:38 +0000
committerJohn Terpstra <jht@samba.org>2003-07-26 16:56:38 +0000
commit168beb5360538f44fd7e380860a6f5f9700dfb1a (patch)
tree8b991dfd76407297e1f0514278717d2ab592d8f6 /source3
parent2c770dd2d643568a4fbe22b42f6bf973d33e1317 (diff)
downloadsamba-168beb5360538f44fd7e380860a6f5f9700dfb1a.tar.gz
samba-168beb5360538f44fd7e380860a6f5f9700dfb1a.tar.bz2
samba-168beb5360538f44fd7e380860a6f5f9700dfb1a.zip
Added buttons to change view mode. Fixes bug #212
(This used to be commit 37d2eed445ec825e31082e4e71c858e1e6356566)
Diffstat (limited to 'source3')
-rw-r--r--source3/web/swat.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/source3/web/swat.c b/source3/web/swat.c
index b43cdd08f1..074f5138a3 100644
--- a/source3/web/swat.c
+++ b/source3/web/swat.c
@@ -519,11 +519,16 @@ static void show_main_buttons(void)
****************************************************************************/
static void ViewModeBoxes(int mode)
{
- d_printf("<p>%s\n", _("Configuration View:&nbsp"));
+ d_printf("<p>%s\n", _("Configuration View:&nbsp Current View is:&nbsp"));
d_printf("<input type=radio name=\"ViewMode\" value=0 %s>Basic\n", (mode == 0) ? "checked" : "");
d_printf("<input type=radio name=\"ViewMode\" value=1 %s>Advanced\n", (mode == 1) ? "checked" : "");
d_printf("<input type=radio name=\"ViewMode\" value=2 %s>Developer\n", (mode == 2) ? "checked" : "");
d_printf("</p><br>\n");
+ d_printf("<p>%s\n", _("Change View To:&nbsp"));
+ d_printf("<input type=submit name=\"BasicMode\" value=\"%s\">\n", _("Basic Mode"));
+ d_printf("<input type=submit name=\"AdvMode\" value=\"%s\">\n", _("Advanced Mode"));
+ d_printf("<input type=submit name=\"DevMode\" value=\"%s\">\n", _("Developer Mode"));
+ d_printf("</p><br>\n");
}
/****************************************************************************
@@ -778,6 +783,12 @@ static void globals_page(void)
if ( cgi_variable("ViewMode") )
mode = atoi(cgi_variable("ViewMode"));
+ if ( cgi_variable("BasicMode"))
+ mode = 0;
+ if ( cgi_variable("AdvMode"))
+ mode = 1;
+ if ( cgi_variable("DevMode"))
+ mode = 2;
d_printf("<form name=\"swatform\" method=post action=globals>\n");
@@ -852,6 +863,11 @@ static void shares_page(void)
d_printf("<table>\n");
if ( cgi_variable("ViewMode") )
mode = atoi(cgi_variable("ViewMode"));
+ if ( cgi_variable("BasicMode"))
+ mode = 0;
+ if ( cgi_variable("AdvMode"))
+ mode = 1;
+ if ( cgi_variable("DevMode"))
ViewModeBoxes( mode );
switch ( mode ) {
case 0: