0
0
Fork 0
mirror of https://github.com/healthchecks/healthchecks.git synced 2025-04-13 08:31:44 +00:00
healthchecks_healthchecks/static/js/add_zulip.js
2020-03-11 16:38:29 +02:00

17 lines
542 B
JavaScript

$(function() {
function updateForm() {
var mType = $('input[name=mtype]:checked').val();
if (mType == "stream") {
$("#z-to-label").text("Stream Name");
$("#z-to-help").text('Example: "general"');
}
if (mType == "private") {
$("#z-to-label").text("User's Email");
$("#z-to-help").text('Example: "alice@example.org"');
}
}
// Update form labels when user clicks on radio buttons
$('input[type=radio][name=mtype]').change(updateForm);
});