Lines 41-53
$(document).ready(function() {
Link Here
|
41 |
reporter_id: reporter_id, |
41 |
reporter_id: reporter_id, |
42 |
}; |
42 |
}; |
43 |
|
43 |
|
|
|
44 |
$('#concern-submit-spinner').show(); |
45 |
$('#addConfirm').prop('disabled', true); |
44 |
$.ajax({ |
46 |
$.ajax({ |
45 |
url: '/api/v1/public/tickets', |
47 |
url: '/api/v1/public/tickets', |
46 |
type: 'POST', |
48 |
type: 'POST', |
47 |
data: JSON.stringify(params), |
49 |
data: JSON.stringify(params), |
48 |
success: function(data) { |
50 |
success: function(data) { |
|
|
51 |
$('#concern-submit-spinner').hide(); |
49 |
$('#addConcernModal').modal('hide'); |
52 |
$('#addConcernModal').modal('hide'); |
50 |
$('#concern_body').val(''); |
53 |
$('#concern_body').val(''); |
|
|
54 |
$('#concern_title').val(''); |
55 |
$('h1:first').before('<div class="alert alert-success">Your concern was sucessfully submitted.</div>'); |
56 |
}, |
57 |
error: function(data) { |
58 |
$('#concern-submit-spinner').hide(); |
59 |
$('#addConcernModal').modal('hide'); |
60 |
$('h1:first').before('<div class="alert alert-error">There was an error when submitting your concern, please contact a librarian.</div>'); |
51 |
}, |
61 |
}, |
52 |
contentType: "json" |
62 |
contentType: "json" |
53 |
}); |
63 |
}); |
54 |
- |
|
|