Fix text on one configuration variable

Fix judge manager to keep the 'show_what' persistent when performing other actions on the table (editing, sorting, etc).
This commit is contained in:
james 2007-02-21 20:42:48 +00:00
parent 40e305b83a
commit 2d6257715e
3 changed files with 12 additions and 7 deletions

View File

@ -53,23 +53,27 @@ function openjudgeinfo(id)
$icon_exitension = $config['icon_extension']; $icon_exitension = $config['icon_extension'];
print("<br /><br />"); print("<br /><br />");
if(isset($_POST['show_what'])) { if(isset($_GET['show_what'])) {
$show_what = $_POST['show_what']; $_SESSION['judgesmanager_show_what']=$_GET['show_what'];
}
if($_SESSION['judgesmanager_show_what']) {
$show_what = $_SESSION['judgesmanager_show_what'];
} else { } else {
$show_what = "cy_complete"; $show_what = "cy_complete";
} }
print("<form name=\"ShowJudges\" method=\"post\" action=\"{$_SERVER['PHP_SELF']}\">"); print("<form name=\"ShowJudges\" method=\"get\" action=\"{$_SERVER['PHP_SELF']}\">");
print("<select id=\"show_what\" name=\"show_what\">"); print("<select id=\"show_what\" name=\"show_what\">");
$s = ($show_what == 'all') ? " selected=selected " : ""; $s = ($show_what == 'all') ? " selected=\"selected\" " : "";
print("<option value=\"all\" $s>All Judges</option>"); print("<option value=\"all\" $s>All Judges</option>");
$s = ($show_what == 'cy_active') ? " selected=selected " : ""; $s = ($show_what == 'cy_active') ? " selected=\"selected\" " : "";
print("<option value=\"cy_active\" $s>All {$config['FAIRYEAR']} Judges (complete and incomplete)</option>"); print("<option value=\"cy_active\" $s>All {$config['FAIRYEAR']} Judges (complete and incomplete)</option>");
$s = ($show_what == 'cy_complete') ? " selected=selected " : ""; $s = ($show_what == 'cy_complete') ? " selected=\"selected\" " : "";
print("<option value=\"cy_complete\" $s>All {$config['FAIRYEAR']} Judges (only complete)</option>"); print("<option value=\"cy_complete\" $s>All {$config['FAIRYEAR']} Judges (only complete)</option>");
print("</select>"); print("</select>");
print("<input type=submit value=\"".i18n("Show")."\">"); print("<input type=submit value=\"".i18n("Show")."\">");
print("</form>"); print("</form>");
echo i18n("Note: Deleting a judge from this screen only unlinks them from the current fairyear");
$editor = new TableEditor('judge'); $editor = new TableEditor('judge');

View File

@ -1 +1 @@
42 43

1
db/db.update.43.sql Normal file
View File

@ -0,0 +1 @@
UPDATE `config` SET `description` = 'The status a project must have to be considered eligible for judge scheduling. ' WHERE `var` = 'project_status' ;