mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-01-31 14:59:08 +01:00
report user also now has sweetalert
This commit is contained in:
parent
d183a79493
commit
0485be8eb9
2 changed files with 11 additions and 2 deletions
|
@ -2,7 +2,7 @@ $(document).on "click", "a[data-action=ab-report]", (ev) ->
|
|||
ev.preventDefault()
|
||||
swal
|
||||
title: "Really report?"
|
||||
text: "A moderator will review this comment and decide what happens."
|
||||
text: "A moderator will review this answer and decide what happens."
|
||||
type: "warning"
|
||||
showCancelButton: true
|
||||
confirmButtonColor: "#DD6B55"
|
||||
|
|
|
@ -50,7 +50,16 @@ $(document).on "click", "a[data-action=report-user]", (ev) ->
|
|||
ev.preventDefault()
|
||||
btn = $(this)
|
||||
target = btn[0].dataset.target
|
||||
if confirm "Are you sure you want to report #{target}?"
|
||||
|
||||
swal
|
||||
title: "Really report #{target}?"
|
||||
text: "A moderator will review this user and decide what happens."
|
||||
type: "warning"
|
||||
showCancelButton: true
|
||||
confirmButtonColor: "#DD6B55"
|
||||
confirmButtonText: "Report"
|
||||
closeOnConfirm: false
|
||||
, ->
|
||||
$.ajax
|
||||
url: '/ajax/report'
|
||||
type: 'POST'
|
||||
|
|
Loading…
Reference in a new issue