2016-10-06 20:34:07 +02:00
|
|
|
<div id="bot-settings" class="settings-section" data-name="your-bots">
|
2017-04-15 05:25:53 +02:00
|
|
|
<div class="bot-settings-form">
|
2017-07-05 21:50:23 +02:00
|
|
|
<div class="tip">
|
2017-08-28 23:03:24 +02:00
|
|
|
{{#tr this}}Looking for our <a href="/integrations" target="_blank">Integrations</a> or <a href="/api" target="_blank">API</a> documentation?{{/tr}}
|
2017-07-05 21:50:23 +02:00
|
|
|
</div>
|
2016-10-05 02:19:14 +02:00
|
|
|
|
2017-05-30 16:12:02 +02:00
|
|
|
<div>
|
2017-06-10 12:32:06 +02:00
|
|
|
<span>{{t 'Download config of all active outgoing webhook bots in Zulip Botserver format.' }}</span>
|
2017-05-30 16:12:02 +02:00
|
|
|
<a type="submit" download="{{flaskbotrc}}" id= "download_flaskbotrc" class="btn" title="{{t 'Download flaskbotrc' }}">
|
|
|
|
<i class="icon-vector-download-alt sea-green"></i>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
|
2017-04-15 05:25:53 +02:00
|
|
|
<ul class="nav nav-tabs nav-justified" id="bots_lists_navbar">
|
2017-07-05 13:07:46 +02:00
|
|
|
<li class="active active-bots-tab"><a>{{t "Active bots" }}</a></li>
|
2017-04-15 05:25:53 +02:00
|
|
|
<li class="inactive-bots-tab"><a>{{t "Inactive bots" }}</a></li>
|
2017-07-05 13:07:46 +02:00
|
|
|
<li class="add-a-new-bot-tab"><a>{{t "Add a new bot" }}</a></li>
|
2017-04-15 05:25:53 +02:00
|
|
|
</ul>
|
2017-02-25 20:14:47 +01:00
|
|
|
|
2017-07-11 15:05:15 +02:00
|
|
|
<ol class="bots_list required-text" id="active_bots_list" data-empty="{{t 'You have no active bots.' }}">
|
2017-04-15 05:25:53 +02:00
|
|
|
</ol>
|
2017-02-25 20:14:47 +01:00
|
|
|
|
2017-07-11 15:05:15 +02:00
|
|
|
<ol class="bots_list required-text" id="inactive_bots_list" data-empty="{{t 'You have no inactive bots.' }}">
|
2017-04-15 05:25:53 +02:00
|
|
|
</ol>
|
2017-02-25 20:14:47 +01:00
|
|
|
|
2017-04-15 05:25:53 +02:00
|
|
|
<div id="bot_table_error" class="alert alert-error hide"></div>
|
2016-10-05 02:19:14 +02:00
|
|
|
|
2017-06-29 07:38:53 +02:00
|
|
|
<div id="add-a-new-bot-form">
|
2017-04-15 05:25:53 +02:00
|
|
|
<form id="create_bot_form" class="form-horizontal no-padding">
|
|
|
|
<div class="new-bot-form">
|
2017-05-30 19:19:48 +02:00
|
|
|
<div class="input-group">
|
|
|
|
<label for="bot_type">
|
|
|
|
{{t "Bot type" }}
|
|
|
|
<i class="icon-vector-question-sign bot_type_tooltip" data-toggle="tooltip"
|
2017-06-07 20:05:14 +02:00
|
|
|
title='{{t "Incoming webhooks can only send messages." }}'></i>
|
2017-05-30 19:19:48 +02:00
|
|
|
</label>
|
|
|
|
<select name="bot_type" id="create_bot_type">
|
2017-11-22 23:58:58 +01:00
|
|
|
{{#each page_params.bot_types}}
|
|
|
|
{{#if this.allowed}}
|
|
|
|
<option value="{{this.type_id}}">{{this.name}}</option>
|
|
|
|
{{/if}}
|
|
|
|
{{/each}}
|
2017-05-30 19:19:48 +02:00
|
|
|
</select>
|
|
|
|
</div>
|
2017-04-15 05:25:53 +02:00
|
|
|
<div class="input-group">
|
|
|
|
<label for="create_bot_name">{{t "Full name" }}</label>
|
|
|
|
<input type="text" name="bot_name" id="create_bot_name" class="required"
|
|
|
|
maxlength=100 placeholder="{{t 'Cookie Bot' }}" value="" />
|
|
|
|
<div><label for="create_bot_name" generated="true" class="text-error"></label></div>
|
|
|
|
</div>
|
|
|
|
<div class="input-group">
|
|
|
|
<label for="bot_short_name">{{t "Username" }}</label>
|
|
|
|
<input type="text" name="bot_short_name" id="create_bot_short_name" class="required bot_local_part"
|
|
|
|
placeholder="cookie" value="" />
|
|
|
|
-bot@{{ page_params.realm_bot_domain }}
|
|
|
|
<div>
|
|
|
|
<label for="create_bot_short_name" generated="true" class="text-error"></label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-07-03 18:35:12 +02:00
|
|
|
<div id="payload_url_inputbox">
|
|
|
|
<div class="input-group">
|
|
|
|
<label for="create_payload_url">{{t "Base URL" }}</label>
|
|
|
|
<input type="text" name="payload_url" id="create_payload_url"
|
|
|
|
maxlength=100 placeholder="https://hostname.example.com/bots/followup" value="" />
|
|
|
|
<div><label for="create_payload_url" generated="true" class="text-error"></label></div>
|
|
|
|
</div>
|
|
|
|
<div class="input-group">
|
|
|
|
<label for="interface_type">{{t "Outgoing webhook message format" }}</label>
|
|
|
|
<select name="interface_type" id="create_interface_type">
|
|
|
|
<option value="1">Zulip</option>
|
|
|
|
<option value="2">{{t "Slack compatible" }}</option>
|
|
|
|
</select>
|
|
|
|
<div><label for="create_interface_type" generated="true" class="text-error"></label></div>
|
|
|
|
</div>
|
2017-06-10 18:43:31 +02:00
|
|
|
</div>
|
2017-04-15 05:25:53 +02:00
|
|
|
<div class="input-group">
|
|
|
|
<div id="bot_avatar_file"></div>
|
|
|
|
<input type="file" name="bot_avatar_file_input" class="notvisible" id="bot_avatar_file_input" value="{{t 'Upload avatar' }}" />
|
2017-06-29 07:38:53 +02:00
|
|
|
<button class="button white rounded small btn-danger display-none" id="bot_avatar_clear_button">{{t "Clear avatar" }}</button>
|
|
|
|
<button class="button white rounded" id="bot_avatar_upload_button">{{t "Customize avatar" }}</button> ({{t "Optional" }})
|
2017-04-15 05:25:53 +02:00
|
|
|
</div>
|
|
|
|
<p>
|
|
|
|
<div id="bot_avatar_file_input_error" class="text-error"></div>
|
|
|
|
</p>
|
2017-06-29 07:38:53 +02:00
|
|
|
<button type="submit" class="button white rounded sea-green" id="create_bot_button">
|
2017-03-18 10:44:00 +01:00
|
|
|
{{t 'Create bot' }}
|
|
|
|
</button>
|
2017-04-15 05:25:53 +02:00
|
|
|
</div>
|
|
|
|
</form>
|
2016-10-05 02:19:14 +02:00
|
|
|
</div>
|
|
|
|
|
2017-04-15 05:25:53 +02:00
|
|
|
</div>
|
2016-10-05 02:19:14 +02:00
|
|
|
</div>
|