ram_checkbox = document.getElementById("telegram_checkbox");
  telegram_checkbox.addEventListener('change', function() {
    if (this.checked) {
      document.getElementById("telegram_bot_token").readOnly = false;
      document.getElementById("telegram_bot_chat_id").readOnly = false;
    }
    else{
      document.getElementById("telegram_bot_token").readOnly = true;
      document.getElementById("telegram_bot_chat_id").readOnly = true;
    }
  });
});
</script>
{% endblock page_level_script %}
