mirror of https://github.com/zulip/zulip.git
Add UI to set listen on stream during bot creation
(imported from commit b481a55c16f853766c82883b4c6c86de5c87759e)
This commit is contained in:
parent
538d76e6ed
commit
17b579911e
|
@ -62,6 +62,7 @@ exports.setup_page = function () {
|
|||
success: function (data) {
|
||||
streams = data.streams;
|
||||
build_stream_list($('#create_bot_default_sending_stream'));
|
||||
build_stream_list($('#create_bot_default_events_register_stream'));
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -387,6 +388,7 @@ exports.setup_page = function () {
|
|||
var full_name = $('#create_bot_name').val();
|
||||
var short_name = $('#create_bot_short_name').val();
|
||||
var default_sending_stream = $('#create_bot_default_sending_stream').val();
|
||||
var default_events_register_stream = $('#create_bot_default_events_register_stream').val();
|
||||
var formData = new FormData();
|
||||
formData.append('csrfmiddlewaretoken', csrf_token);
|
||||
formData.append('full_name', full_name);
|
||||
|
@ -394,6 +396,7 @@ exports.setup_page = function () {
|
|||
|
||||
if (feature_flags.new_bot_ui) {
|
||||
formData.append('default_sending_stream', default_sending_stream);
|
||||
formData.append('default_events_register_stream', default_events_register_stream);
|
||||
}
|
||||
|
||||
jQuery.each($('#bot_avatar_file_input')[0].files, function (i, file) {
|
||||
|
|
|
@ -241,6 +241,10 @@
|
|||
<label for="create_bot_default_sending_stream" class="control-label">Send to stream</label>
|
||||
<select name="bot_default_sending_stream" id="create_bot_default_sending_stream"></select>
|
||||
</div>
|
||||
<div class="control-group new-bot-ui">
|
||||
<label for="create_bot_default_events_register_stream" class="control-label">Listen on</label>
|
||||
<select name="bot_default_events_register_stream" id="create_bot_default_events_register_stream"></select>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div id="bot_avatar_file"></div>
|
||||
|
|
Loading…
Reference in New Issue