mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 10:26:28 +00:00
Allow users to deactivate their bots from the website.
(The back end had been in place already.) (imported from commit ec4b7b3ea39d71d86b0bdc161740e494ce1e13f7)
This commit is contained in:
@@ -163,6 +163,19 @@ $(function () {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#bots_list").on("click", "button.delete_bot", function (e) {
|
||||||
|
var email = $(e.target).data('email');
|
||||||
|
$.ajax({
|
||||||
|
url: '/json/users/' + encodeURIComponent(email),
|
||||||
|
type: 'DELETE',
|
||||||
|
success: function () {
|
||||||
|
var row = $(e.target).closest("li");
|
||||||
|
row.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
}());
|
}());
|
||||||
|
|||||||
@@ -12,5 +12,8 @@
|
|||||||
<span class="field">API Key</span>
|
<span class="field">API Key</span>
|
||||||
<span class="value">{{api_key}}</e>
|
<span class="value">{{api_key}}</e>
|
||||||
</div>
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary delete_bot" data-email="{{email}}">
|
||||||
|
Delete Bot
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
Reference in New Issue
Block a user