forked from science-ation/science-ation
- Add support for setting the external identifier
This commit is contained in:
parent
d2535f46bc
commit
1e830e47bc
@ -202,6 +202,9 @@
|
||||
if($r['download_award'] == 'yes') $ret['dl'][] = $r['fairs_id'];
|
||||
if($r['upload_winners'] == 'yes') $ret['ul'][] = $r['fairs_id'];
|
||||
}
|
||||
$q = mysql_query("SELECT * FROM award_awards WHERE id='$id'");
|
||||
$a = mysql_fetch_assoc($q);
|
||||
$ret['identifier'] = $a['external_identifier'];
|
||||
echo json_encode($ret);
|
||||
exit;
|
||||
|
||||
@ -227,6 +230,9 @@
|
||||
VALUES ('$id','$fairs_id','$dl','$ul')");
|
||||
echo mysql_error();
|
||||
}
|
||||
$ident=mysql_escape_string(stripslashes($_POST['identifier']));
|
||||
mysql_query("UPDATE award_awards SET external_identifier='$ident' WHERE id='$id'");
|
||||
|
||||
happy_("Saved");
|
||||
exit;
|
||||
}
|
||||
@ -391,6 +397,7 @@ function update_feeder()
|
||||
$.getJSON("<?=$_SERVER['PHP_SELF']?>?action=feeder_load&id="+id,
|
||||
function(json) {
|
||||
$("#feeder_id").val(id);
|
||||
$("#feeder_identifier").val(json.identifier);
|
||||
$("[name=feeder_dl\\[\\]]").val(json.dl);
|
||||
$("[name=feeder_ul\\[\\]]").val(json.ul);
|
||||
});
|
||||
@ -613,9 +620,14 @@ $(document).ready(function() {
|
||||
<div id="editor_tab_feeder">
|
||||
<div id="feeder_notice" class="notice_area"></div>
|
||||
<h4><?=i18n("Feeder Fairs")?></h4>
|
||||
<p><?=("Select which feeder fairs can download this award and upload winners.")?></p>
|
||||
<form id="feeder_form">
|
||||
<input type="hidden" id="feeder_id" name="award_awards_id" value=""/>
|
||||
<p><?=i18n("Give this award a unique name to distinguish it from any other awards the fair may download.")?></p>
|
||||
<table class="tableedit">
|
||||
<tr><td class="left"><?=i18n('Unique Name')?>:</td>
|
||||
<td class="right"><input type="text" id="feeder_identifier" name="identifier" value="" size="40" maxlength="128" /></td>
|
||||
</tr></table>
|
||||
<p><?=i18n("Select which feeder fairs can download this award and upload winners.")?></p>
|
||||
<table class="tableview">
|
||||
<tr><th><?=i18n("Fair")?></th>
|
||||
<th style="width: 5em"><?=i18n("Download Award")?></th>
|
||||
|
Loading…
Reference in New Issue
Block a user