From 2e65273b970dc755a61aa3c84593467ee44713d3 Mon Sep 17 00:00:00 2001 From: james Date: Thu, 26 Nov 2009 19:09:37 +0000 Subject: [PATCH] Make the status on the judge other and judge expertise pages work. A few updates for consistency when embedded in the editor popup --- judge_expertise.php | 37 +++++++++++++++++++++++++------------ judge_other.php | 34 +++++++++++++++++++++------------- judge_special_awards.php | 2 +- 3 files changed, 47 insertions(+), 26 deletions(-) diff --git a/judge_expertise.php b/judge_expertise.php index 987307b..5598100 100644 --- a/judge_expertise.php +++ b/judge_expertise.php @@ -72,11 +72,20 @@ case 'save': } user_save($u); happy_("Preferences successfully saved"); + + //reload the user record because we dont know if we saved or didnt save above, we just want + //to know what the user looks like _now_ + $u = user_load($eid); + $newstatus=judge_status_expertise($u); + echo "\n"; exit; } if($_SESSION['embed'] == true) { + echo "

".i18n("Judging Expertise")."

"; display_messages(); } else { //send the header @@ -85,6 +94,7 @@ case 'save': ); } +$newstatus=judge_status_expertise($u); ?> \n"; if($u['special_award_only'] == 'yes') { echo i18n("You have specified that you are a judge for a specific special award. Divisional Judging preferences have been disabled because they do not apply to you."); @@ -114,13 +128,12 @@ if($_SESSION['embed'] != true) { exit; } - echo "
\n"; echo "\n"; $q=mysql_query("SELECT * FROM projectcategories WHERE year='{$config['FAIRYEAR']}' ORDER BY mingrade"); - echo "

".i18n("Age Category Preferences")."


"; - echo ""; + echo "

".i18n("Age Category Preferences")."


"; + echo "
"; while($r=mysql_fetch_object($q)) { echo "
"; diff --git a/judge_other.php b/judge_other.php index bac9704..da5126f 100644 --- a/judge_other.php +++ b/judge_other.php @@ -61,13 +61,19 @@ case 'save': user_save($u); questions_save_answers("judgereg",$u['id'],$_POST['questions']); happy_("Preferences successfully saved"); + + $u=user_load($eid); + $newstatus=judge_status_other($u); + echo "\n"; exit; } if($_SESSION['embed'] == true) { echo "
"; display_messages(); - echo "

".i18n('Other Information')."

"; + echo "

".i18n('Other Information')."

"; echo "
"; } else { //send the header @@ -76,6 +82,7 @@ case 'save': ); } +$newstatus=judge_status_other($u); ?> -'); + } + else + $("#other_info_status").html(''); } -?> +//when we're ready, output the status +$(document).ready( function() { other_update_status('');}); + +\n"; +?> diff --git a/judge_special_awards.php b/judge_special_awards.php index da95ce4..3bbc308 100644 --- a/judge_special_awards.php +++ b/judge_special_awards.php @@ -59,7 +59,7 @@ case 'save': if($_SESSION['embed'] == true) { display_messages(); - echo "

".i18n('Special Awards')."

"; + echo "

".i18n('Special Awards')."

"; echo "
"; } else { //send the header