Permalink
Browse files

Fix delete user event listener

  • Loading branch information...
greyli committed Sep 12, 2018
1 parent 51cc2d4 commit c264aac6fd35f527e0bd461b88fa05ab207b55f2
Showing with 2 additions and 2 deletions.
  1. +1 −1 catchat/static/js/script.js
  2. +1 −1 catchat/templates/chat/_profile_card.html
@@ -213,7 +213,7 @@ $(document).ready(function () {
});
// delete user
$('.delete-user-button').on('click', function () {
$(document).on('click', '.delete-user-button', function () {
var $this = $(this);
$.ajax({
type: 'DELETE',
@@ -18,7 +18,7 @@
{% endif %}
{% if current_user.is_admin and not user.is_admin %}
<i class="delete icon"></i>
<a class="delete-user-btn" href="#!" data-href="{{ url_for('admin.block_user', user_id=user.id) }}"
<a class="delete-user-button" href="#!" data-href="{{ url_for('admin.block_user', user_id=user.id) }}"
onclick="confirm('Are you sure?')">Delete</a>
{% endif %}
</div>

0 comments on commit c264aac

Please sign in to comment.