forked from science-ation/science-ation
Fixes for bugs 418 and 412
- when editing awards, the list now gets refreshed upon update - increased size of donors notes fields
This commit is contained in:
parent
5956a15754
commit
2563f8295e
@ -28,6 +28,9 @@
|
|||||||
require_once('awards.inc.php');
|
require_once('awards.inc.php');
|
||||||
|
|
||||||
switch($_GET['action']) {
|
switch($_GET['action']) {
|
||||||
|
case 'draw_awards_table':
|
||||||
|
draw_awards_table();
|
||||||
|
exit;
|
||||||
case 'awardinfo_load':
|
case 'awardinfo_load':
|
||||||
$id = intval($_GET['id']);
|
$id = intval($_GET['id']);
|
||||||
$q=mysql_query("SELECT * FROM award_awards WHERE id='$id'");
|
$q=mysql_query("SELECT * FROM award_awards WHERE id='$id'");
|
||||||
@ -395,7 +398,7 @@ function awardinfo_save()
|
|||||||
$("#popup_editor").dialog('close');
|
$("#popup_editor").dialog('close');
|
||||||
popup_editor(award_id, '');
|
popup_editor(award_id, '');
|
||||||
}
|
}
|
||||||
|
draw_awards_table();
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -865,6 +868,10 @@ function award_delete(id)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function draw_awards_table(){
|
||||||
|
$('#awards_table').load("<?=$_SERVER['PHP_SELF']?>?action=draw_awards_table");
|
||||||
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
awardlist_refresh();
|
awardlist_refresh();
|
||||||
});
|
});
|
||||||
@ -965,6 +972,26 @@ echo "</table>";
|
|||||||
<br /><br />
|
<br /><br />
|
||||||
|
|
||||||
<?
|
<?
|
||||||
|
echo "<div id=\"awards_table\">";
|
||||||
|
draw_awards_table();
|
||||||
|
echo "</div>";
|
||||||
|
|
||||||
|
if($_GET['action'] == 'edit_prize_template') {
|
||||||
|
|
||||||
|
?><script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
popup_editor(-1,'template');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
send_footer();
|
||||||
|
|
||||||
|
function draw_awards_table(){
|
||||||
|
global $config;
|
||||||
|
$award_types_id=$_SESSION['award_types_id'];
|
||||||
|
$sponsors_id=$_SESSION['sponsors_id'];
|
||||||
|
|
||||||
/* For some reason, this submit button opens the dialog then it closes right away, but it doesn't
|
/* For some reason, this submit button opens the dialog then it closes right away, but it doesn't
|
||||||
* if the entry is done through the a href */
|
* if the entry is done through the a href */
|
||||||
//<input type="submit" onClick="award_create();" value="<?=i18n("Create New Award")>" />
|
//<input type="submit" onClick="award_create();" value="<?=i18n("Create New Award")>" />
|
||||||
@ -995,8 +1022,7 @@ $q=mysql_query("SELECT
|
|||||||
|
|
||||||
echo mysql_error();
|
echo mysql_error();
|
||||||
|
|
||||||
if(mysql_num_rows($q))
|
if(mysql_num_rows($q)){
|
||||||
{
|
|
||||||
echo "* ".i18n("Click on the Script Order and drag to re-order the awards");
|
echo "* ".i18n("Click on the Script Order and drag to re-order the awards");
|
||||||
echo "<table id=\"awardlist\" class=\"tableview\" >";
|
echo "<table id=\"awardlist\" class=\"tableview\" >";
|
||||||
echo "<tr class=\"nodrop nodrag\">";
|
echo "<tr class=\"nodrop nodrag\">";
|
||||||
@ -1041,24 +1067,9 @@ if(mysql_num_rows($q))
|
|||||||
if($hasexternal)
|
if($hasexternal)
|
||||||
echo "<tr class=\"externalaward\"><td colspan=\"6\">".i18n("Indicates award imported from an external source")."</td></tr>";
|
echo "<tr class=\"externalaward\"><td colspan=\"6\">".i18n("Indicates award imported from an external source")."</td></tr>";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "</form>";
|
// echo "</form>";
|
||||||
}
|
}
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
//echo "<a href=\"award_prizes.php?award_awards_id=-1\">Edit prizes for the generic prize template</a>";
|
//echo "<a href=\"award_prizes.php?award_awards_id=-1\">Edit prizes for the generic prize template</a>";
|
||||||
|
|
||||||
|
|
||||||
if($_GET['action'] == 'edit_prize_template') {
|
|
||||||
|
|
||||||
?><script type="text/javascript">
|
|
||||||
$(document).ready(function() {
|
|
||||||
popup_editor(-1,'template');
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<?
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
send_footer();
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -741,7 +741,7 @@ function draw_contact_form($sponsor_id, $contact = null){
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><?=i18n("Notes"); ?></td>
|
<td><?=i18n("Notes"); ?></td>
|
||||||
<td colspan="3"><textarea name="notes" cols="60" rows="4"><?=htmlspecialchars($contact['notes'])?></textarea></td>
|
<td colspan="3"><textarea name="notes" cols="60" rows="8"><?=htmlspecialchars($contact['notes'])?></textarea></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?=i18n("Primary Contact")?></td>
|
<td><?=i18n("Primary Contact")?></td>
|
||||||
@ -1239,7 +1239,7 @@ echo "<hr />";
|
|||||||
</td></tr>
|
</td></tr>
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<tr><td><?=i18n("Notes")?></td><td colspan="5"><textarea id="organizationinfo_notes" name="notes" rows="4" cols="60"></textarea></td></tr>
|
<tr><td><?=i18n("Notes")?></td><td colspan="5"><textarea id="organizationinfo_notes" name="notes" rows="8" cols="60"></textarea></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<input id="organizationinfo_save_button" type="submit" value="<?=i18n("Save")?>" onClick="return organizationinfo_save()" />
|
<input id="organizationinfo_save_button" type="submit" value="<?=i18n("Save")?>" onClick="return organizationinfo_save()" />
|
||||||
</form>
|
</form>
|
||||||
|
Loading…
Reference in New Issue
Block a user