forked from science-ation/science-ation
- Add two more fields:
- additional_materials: if there are additional materials required if a fair assigns a winner to this award. - register_winners: to tell the feeder fair that this award is for winners who will participate at the upstream fair
This commit is contained in:
parent
25f19d9fbd
commit
0f31f72f07
@ -218,6 +218,8 @@
|
||||
$q = mysql_query("SELECT * FROM award_awards WHERE id='$id'");
|
||||
$a = mysql_fetch_assoc($q);
|
||||
$ret['identifier'] = $a['external_identifier'];
|
||||
$ret['additional_materials'] = $a['external_additional_materials'];
|
||||
$ret['register_winners'] = $a['external_register_winners'];
|
||||
echo json_encode($ret);
|
||||
exit;
|
||||
|
||||
@ -244,7 +246,11 @@
|
||||
echo mysql_error();
|
||||
}
|
||||
$ident=mysql_escape_string(stripslashes($_POST['identifier']));
|
||||
mysql_query("UPDATE award_awards SET external_identifier='$ident' WHERE id='$id'");
|
||||
$mat = intval($_POST['additional_materials']);
|
||||
$w = intval($_POST['register_winners']);
|
||||
mysql_query("UPDATE award_awards SET external_identifier='$ident',
|
||||
external_additional_materials='$mat',
|
||||
external_register_winners='$w' WHERE id='$id'");
|
||||
|
||||
happy_("Feeder Fair information saved");
|
||||
exit;
|
||||
@ -470,6 +476,8 @@ function update_feeder()
|
||||
function(json) {
|
||||
$("#feeder_id").val(award_id);
|
||||
$("#feeder_identifier").val(json.identifier);
|
||||
$("#feeder_additional_materials").val([json.additional_materials]);
|
||||
$("#feeder_register_winners").val([json.register_winners]);
|
||||
$("[name=feeder_dl\\[\\]]").val(json.dl);
|
||||
$("[name=feeder_ul\\[\\]]").val(json.ul);
|
||||
|
||||
@ -729,9 +737,9 @@ $(document).ready(function() {
|
||||
<table class="tableedit">
|
||||
<tr><td><?=i18n('Unique Name')?>:</td>
|
||||
<td><input type="text" id="feeder_identifier" name="identifier" value="" size="40" maxlength="128" /></td></tr>
|
||||
<tr><td><input type="checkbox" id="feeder_advance" name="advance" value="yes" /></td>
|
||||
<tr><td><input type="checkbox" id="feeder_register_winners" name="register_winners" value="1" /></td>
|
||||
<td><?=i18n("Winners uploaded by a feeder fair should be registered as participants at this fair (both download award and upload winners should be turned on below)")?></td></tr>
|
||||
<tr><td><input type="checkbox" id="feeder_additional" name="additional" value="yes" /></td>
|
||||
<tr><td><input type="checkbox" id="feeder_additional_materials" name="additional_materials" value="1" /></td>
|
||||
<td><?=i18n("There is additional material for this award (e.g. forms, instructions). If a feeder fair assigns a winner to this award, they will be told they need to contact this fair to get the additional material.")?></td></tr>
|
||||
</table>
|
||||
<p><?=i18n("Select which feeder fairs can download this award and upload winners.")?></p>
|
||||
|
@ -1 +1 @@
|
||||
138
|
||||
139
|
||||
|
2
db/db.update.139.sql
Normal file
2
db/db.update.139.sql
Normal file
@ -0,0 +1,2 @@
|
||||
ALTER TABLE `award_awards` ADD `external_additional_materials` BOOL NOT NULL AFTER `external_postback`;
|
||||
ALTER TABLE `award_awards` ADD `external_register_winners` BOOL NOT NULL AFTER `external_additional_materials` ;
|
@ -83,6 +83,8 @@ function handle_getawards(&$u, $fair, &$data, &$response)
|
||||
while($a = mysql_fetch_assoc($q)) {
|
||||
$award = array();
|
||||
$award['identifier'] = $a['external_identifier'];
|
||||
$award['external_additional_materials'] = $a['external_additional_materials'];
|
||||
$award['external_register_winners'] = $a['external_register_winners'];
|
||||
$award['year'] = $a['year'];
|
||||
$award['name_en'] = $a['name'];
|
||||
$award['criteria_en'] = $a['criteria'];
|
||||
|
Loading…
Reference in New Issue
Block a user