mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-05-10 21:14:05 +08:00
reply ticket
This commit is contained in:
20
core/static/script/ticket/reply.coffee
Normal file
20
core/static/script/ticket/reply.coffee
Normal file
@@ -0,0 +1,20 @@
|
||||
$ ->
|
||||
$('#reply').on 'click', (e) ->
|
||||
e.preventDefault()
|
||||
data = {
|
||||
id: $('#ticketid').data 'id'
|
||||
content: $('#reply-content').val()
|
||||
}
|
||||
|
||||
$.ajax {
|
||||
method: 'post'
|
||||
url: '/ticket/reply/'
|
||||
data: data
|
||||
}
|
||||
|
||||
.done (r) ->
|
||||
location.reload true
|
||||
.fail (r) ->
|
||||
if reply.status is 400
|
||||
error = reply.responseJSON.error
|
||||
ErrorHandle.flushError error
|
||||
Reference in New Issue
Block a user