From 168beb5360538f44fd7e380860a6f5f9700dfb1a Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Sat, 26 Jul 2003 16:56:38 +0000 Subject: Added buttons to change view mode. Fixes bug #212 (This used to be commit 37d2eed445ec825e31082e4e71c858e1e6356566) --- source3/web/swat.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'source3/web') 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("

%s\n", _("Configuration View: ")); + d_printf("

%s\n", _("Configuration View:  Current View is: ")); d_printf("Basic\n", (mode == 0) ? "checked" : ""); d_printf("Advanced\n", (mode == 1) ? "checked" : ""); d_printf("Developer\n", (mode == 2) ? "checked" : ""); d_printf("


\n"); + d_printf("

%s\n", _("Change View To: ")); + d_printf("\n", _("Basic Mode")); + d_printf("\n", _("Advanced Mode")); + d_printf("\n", _("Developer Mode")); + d_printf("


\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("
\n"); @@ -852,6 +863,11 @@ static void shares_page(void) d_printf("\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: -- cgit