Skip to content

Commit

Permalink
Allow uploading of orders
Browse files Browse the repository at this point in the history
  • Loading branch information
jimwins committed Aug 23, 2016
1 parent ff33271 commit 7ee236c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions index.php
Expand Up @@ -1396,4 +1396,19 @@ function (data) {
echo 'Txn.loadData(', json_encode($data), ");\n";
}
?>
$("body").html5Uploader({
name: 'src',
postUrl: 'api/txn-upload-items.php?txn=' + Txn.id(),
onSuccess: function(e, file, response) {
data= $.parseJSON(response);
if (data.error) {
displayError(data);
return;
}
Txn.loadData(data);
},
onServerError: function(e, file) {
alert("File upload failed.");
},
});
</script>

0 comments on commit 7ee236c

Please sign in to comment.