From: Joe Z. <jz...@us...> - 2004-01-20 04:14:04
|
Update of /cvsroot/bobs/bobs/inc In directory sc8-pr-cvs1:/tmp/cvs-serv24659/inc Modified Files: config.php.in gui.pinc Log Message: Separate option/text in drop down lists. Index: config.php.in =================================================================== RCS file: /cvsroot/bobs/bobs/inc/config.php.in,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- config.php.in 29 Dec 2003 02:43:28 -0000 1.9 +++ config.php.in 20 Jan 2004 04:14:01 -0000 1.10 @@ -49,7 +49,9 @@ $server_defs["backup_method"]["type"] = "list"; $server_defs["backup_method"]["desc"] = "Method for creating backups"; $server_defs["backup_method"]["list"]["0"] = "rsync"; +$server_defs["backup_method"]["list_text"]["0"] = "rsync using remote daemon"; $server_defs["backup_method"]["list"]["1"] = "rsync_ssh"; +$server_defs["backup_method"]["list_text"]["1"] = "rsync over ssh"; $server_defs["backup_method"]["list"]["2"] = "nfs"; $server_defs["backup_method"]["list"]["3"] = "smb"; Index: gui.pinc =================================================================== RCS file: /cvsroot/bobs/bobs/inc/gui.pinc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- gui.pinc 18 May 2003 06:37:41 -0000 1.3 +++ gui.pinc 20 Jan 2004 04:14:01 -0000 1.4 @@ -37,8 +37,13 @@ $html .= html_checkbox($name, $value, $io); break; case "list": - foreach ($server_defs["$name"]["list"] as $option){ - $options[] .= $option; + foreach ($server_defs["$name"]["list"] as $option_key => $option){ + $option_text = $server_defs["$name"]["list_text"]["$option_key"]; + if ($option_text != ''){ + $options["$option"] .= $option_text; + } else { + $options["$option"] .= $option; + } } $html .= html_list($name, $value, $io, $options); break; @@ -152,12 +157,12 @@ if ($io == 'i'){ $html .= "<select name=\"settings[$name]\">\n"; - foreach ($options as $option){ + foreach ($options as $option => $option_text){ $html .= "<option value=\"$option\""; if ($value == $option) { $html .= " selected"; } - $html .= ">$option\n"; + $html .= ">$option_text\n"; } $html .= "</select>\n"; } else { |