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">
|
|
|
|
<p class="bot-settings-note padded-container">
|
|
|
|
{{#tr this}}
|
|
|
|
Looking for our <a href="/integrations" target="_blank">Integrations</a>
|
|
|
|
or <a href="{{ server_uri }}/api" target="_blank">API</a> documentation?
|
|
|
|
{{/tr}}
|
|
|
|
</p>
|
2016-10-05 02:19:14 +02:00
|
|
|
|
2017-04-15 05:25:53 +02:00
|
|
|
<ul class="nav nav-tabs nav-justified" id="bots_lists_navbar">
|
|
|
|
<li class="active active-bots-tab"><a>{{t "Active bots" }}</a></li>
|
|
|
|
<li class="inactive-bots-tab"><a>{{t "Inactive bots" }}</a></li>
|
|
|
|
</ul>
|
2017-02-25 20:14:47 +01:00
|
|
|
|
2017-04-15 05:25:53 +02:00
|
|
|
<ol class="bots_list" id="active_bots_list">
|
|
|
|
</ol>
|
2017-02-25 20:14:47 +01:00
|
|
|
|
2017-04-15 05:25:53 +02:00
|
|
|
<ol class="bots_list" id="inactive_bots_list">
|
|
|
|
</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-04-15 05:25:53 +02:00
|
|
|
<div class="add-new-bot-box grey-bg">
|
|
|
|
<form id="create_bot_form" class="form-horizontal no-padding">
|
|
|
|
<h4 class="new-bot-section-title light no-margin">{{t "Add a new bot" }}</h4>
|
|
|
|
<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">
|
|
|
|
<option value="1">{{t "Generic bot" }}</option>
|
|
|
|
<option value="2">{{t "Incoming webhook" }}</option>
|
2017-06-10 18:43:31 +02:00
|
|
|
<option value="3">{{t "Outgoing webhook" }}</option>
|
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-06-10 18:43:31 +02:00
|
|
|
<div class="input-group" id="payload_url_inputbox">
|
|
|
|
<label for="create_payload_url">{{t "Outgoing webhook service 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>
|
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-06 01:57:22 +02:00
|
|
|
<button class="button rounded small btn-danger display-none" id="bot_avatar_clear_button">{{t "Clear avatar" }}</button>
|
|
|
|
<button class="button 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-06 01:57:22 +02:00
|
|
|
<button type="submit" class="button 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
|
|
|
<hr class="settings_separator" />
|
2016-10-05 02:19:14 +02:00
|
|
|
|
2017-04-15 05:25:53 +02:00
|
|
|
<div class="form-horizontal" id="api_key_button_box">
|
|
|
|
<div class="input-group side-padded-container">
|
|
|
|
<p class="api-key-note">
|
|
|
|
{{#tr this}}
|
|
|
|
For most bots using the API, you'll want to give each bot
|
|
|
|
its own name and API key using the above section. But if you
|
|
|
|
want to write a bot that can access your own private
|
|
|
|
messages, you should use your personal API key.
|
|
|
|
{{/tr}}
|
|
|
|
</p>
|
2017-06-06 01:57:22 +02:00
|
|
|
<button class="button rounded" id="api_key_button">{{t "Show/change your API key" }}</button>
|
2017-04-15 05:25:53 +02:00
|
|
|
</div>
|
2016-10-05 02:19:14 +02:00
|
|
|
</div>
|
2017-04-15 05:25:53 +02:00
|
|
|
<div id="get_api_key_box" class="side-padded-container">
|
|
|
|
<p>{{t "Please re-enter your password to confirm your identity." }}
|
|
|
|
<a href="/accounts/password/reset/" target="_blank">{{t "Forgotten it?" }}</a></p>
|
|
|
|
<form action="/json/fetch_api_key" method="post" class="form-horizontal">
|
|
|
|
<div class="control-group">
|
|
|
|
<label for="password" class="control-label">{{t "Current password" }}</label>
|
|
|
|
<input type="password" autocomplete="off"
|
|
|
|
name="password" id="get_api_key_password" value="" />
|
|
|
|
</div>
|
|
|
|
<div class="control-group">
|
|
|
|
<input type="submit" name="view_api_key" value="{{t 'Get API key' }}"
|
|
|
|
class="btn btn-primary" />
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div id="show_api_key_box" class="side-padded-container">
|
|
|
|
<p>{{t "Your API key:" }}</p>
|
|
|
|
<p><b><span id="api_key_value"></span></b></p>
|
|
|
|
<button type="submit" class="btn btn-primary regenerate_api_key">
|
|
|
|
{{t "Generate new API key" }}
|
|
|
|
</button>
|
|
|
|
<a id="download_zuliprc" download="{{zuliprc}}" class="btn btn-success">
|
|
|
|
{{t "Download .zuliprc" }}
|
|
|
|
</a>
|
|
|
|
<div id="user_api_key_error text-error">
|
|
|
|
</div>
|
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>
|