Added ability to upload a receipt from the user page
This commit is contained in:
parent
2cc670b58f
commit
d1add8ee7c
6 changed files with 208 additions and 24 deletions
4
public/static/user/css/main.css
Normal file
4
public/static/user/css/main.css
Normal file
|
@ -0,0 +1,4 @@
|
|||
body {
|
||||
background: whitesmoke;
|
||||
padding-top: 70px;
|
||||
}
|
24
public/static/user/js/home.js
Normal file
24
public/static/user/js/home.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
$(function() {
|
||||
$('form#receipt-form').submit(function( event ) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
// Create new form data object with the contents of this form
|
||||
var formData = new FormData(this);
|
||||
|
||||
$.ajax({
|
||||
url: $(this).attr("action"),
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
success: function(data) {
|
||||
alert(data);
|
||||
},
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false
|
||||
});
|
||||
|
||||
// Stop propogation of event
|
||||
return false;
|
||||
});
|
||||
});
|
Reference in a new issue