Add UI to set listen on stream during bot creation

(imported from commit b481a55c16f853766c82883b4c6c86de5c87759e)
This commit is contained in:
Jason Michalski 2014-02-12 17:35:15 -05:00
parent 538d76e6ed
commit 17b579911e
2 changed files with 7 additions and 0 deletions

View File

@ -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) {

View 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>