forked from science-ation/science-ation
Dont try to process awards if there is no awards to process
Change the class on the prize edit page to be tableview and tableedit instead of summarytable and none (for consistency with the awards page)
This commit is contained in:
parent
325c909432
commit
3f3d242f6d
@ -89,8 +89,14 @@
|
||||
$ar=$response['awardresponse'][0];
|
||||
$postback=$ar['postback'][0];
|
||||
echo i18n("Postback URL: %1",array($postback))." <br />";
|
||||
$numawards=count($ar['awards'][0]['award']);
|
||||
if($ar['awards'][0]['award'])
|
||||
$numawards=count($ar['awards'][0]['award']);
|
||||
else
|
||||
$numawards=0;
|
||||
|
||||
echo i18n("Number of Awards: %1",array($numawards))." <br />";
|
||||
if($numawards>0) {
|
||||
|
||||
foreach($ar['awards'][0]['award'] AS $award) {
|
||||
$identifier=$award['identifier'][0];
|
||||
$year=$award['year'][0];
|
||||
@ -274,6 +280,7 @@ echo mysql_error();
|
||||
}
|
||||
echo "<br />";
|
||||
|
||||
}
|
||||
}
|
||||
echo "</i>";
|
||||
|
||||
@ -286,6 +293,7 @@ echo mysql_error();
|
||||
}
|
||||
else
|
||||
echo error(i18n("Invalid XML response. Expecting '%1', received '%2'",array("awardresponse",$keys[0])));
|
||||
// echo "response=".print_r($datastream);
|
||||
|
||||
echo "<br />";
|
||||
}
|
||||
|
@ -134,7 +134,7 @@
|
||||
if($_GET['action']=="edit")
|
||||
echo "<input type=\"hidden\" name=\"id\" value=\"".$_GET['edit']."\">\n";
|
||||
|
||||
echo "<table>\n";
|
||||
echo "<table class=\"tableedit\">\n";
|
||||
echo "<tr><td>".i18n("Prize Description")."<br />(".i18n("If non cash/scholarship").")</td><td></td><td><input type=\"text\" id=\"prize\" name=\"prize\" value=\"".htmlspecialchars($r->prize)."\" size=\"40\" maxlength=\"128\" /><script type=\"text/javascript\">translateButton('prize');</script></td></tr>\n";
|
||||
echo "<tr><td>".i18n("Cash Amount")."</td><td>\$</td><td><input type=\"text\" name=\"cash\" value=\"".htmlspecialchars($r->cash)."\" size=\"10\" maxlength=\"10\" /></td></tr>\n";
|
||||
echo "<tr><td>".i18n("Scholarship Amount")."</td><td>\$</td><td><input type=\"text\" name=\"scholarship\" value=\"".htmlspecialchars($r->scholarship)."\" size=\"10\" maxlength=\"10\" /></td></tr>\n";
|
||||
@ -187,7 +187,7 @@
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"reorder\">";
|
||||
echo "<input type=\"hidden\" name=\"award_awards_id\" value=\"$award_awards_id\">";
|
||||
|
||||
echo "<table class=\"summarytable\">";
|
||||
echo "<table class=\"tableview\">";
|
||||
echo "<tr>";
|
||||
echo " <th>".i18n("Order")."</th>";
|
||||
echo " <th>".i18n("Prize Description")."</th>";
|
||||
|
Loading…
Reference in New Issue
Block a user