2023-01-10 16:04:43 +01:00
|
|
|
<form id="create_bot_form" class="new-style">
|
2022-09-15 14:07:39 +02:00
|
|
|
<div class="new-bot-form">
|
|
|
|
<div class="input-group">
|
2024-04-01 15:48:08 +02:00
|
|
|
<label for="bot_type" class="modal-field-label">
|
2022-09-15 14:07:39 +02:00
|
|
|
{{t "Bot type" }}
|
2024-02-06 22:57:48 +01:00
|
|
|
{{> ../help_link_widget link="/help/bots-overview#bot-type" }}
|
2022-09-15 14:07:39 +02:00
|
|
|
</label>
|
2023-02-16 11:20:07 +01:00
|
|
|
<select name="bot_type" id="create_bot_type" class="modal_select bootstrap-focus-style">
|
2022-09-15 14:07:39 +02:00
|
|
|
{{#each bot_types}}
|
|
|
|
{{#if this.allowed}}
|
|
|
|
<option value="{{this.type_id}}">{{this.name}}</option>
|
|
|
|
{{/if}}
|
|
|
|
{{/each}}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<div class="input-group" id="service_name_list">
|
2024-04-01 15:48:08 +02:00
|
|
|
<label for="select_service_name" class="modal-field-label">{{t "Bot"}}</label>
|
2023-02-16 11:20:07 +01:00
|
|
|
<select name="service_name" id="select_service_name" class="modal_select bootstrap-focus-style">
|
2022-09-15 14:07:39 +02:00
|
|
|
{{#each realm_embedded_bots}}
|
|
|
|
<option value="{{this.name}}">{{this.name}}</option>
|
|
|
|
{{/each}}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<div class="input-group">
|
2024-04-01 15:48:08 +02:00
|
|
|
<label for="create_bot_name" class="modal-field-label">{{t "Name" }}</label>
|
2023-03-27 10:24:27 +02:00
|
|
|
<input type="text" name="bot_name" id="create_bot_name" class="required modal_text_input"
|
2022-09-15 14:07:39 +02:00
|
|
|
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">
|
2024-04-01 15:48:08 +02:00
|
|
|
<label for="bot_short_name" class="modal-field-label">{{t "Bot email (a-z, 0-9, and dashes only)" }}</label>
|
2023-03-27 10:24:27 +02:00
|
|
|
<input type="text" name="bot_short_name" id="create_bot_short_name" class="required bot_local_part modal_text_input"
|
2022-09-15 14:07:39 +02:00
|
|
|
placeholder="{{t 'cookie' }}" value="" />
|
|
|
|
-bot@{{ realm_bot_domain }}
|
|
|
|
<div>
|
|
|
|
<label for="create_bot_short_name" generated="true" class="text-error"></label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="payload_url_inputbox">
|
|
|
|
<div class="input-group">
|
2024-04-01 15:48:08 +02:00
|
|
|
<label for="create_payload_url" class="modal-field-label">{{t "Endpoint URL" }}</label>
|
2023-06-20 08:39:31 +02:00
|
|
|
<input type="text" name="payload_url" id="create_payload_url" class="modal_text_input"
|
2022-09-15 14:07:39 +02:00
|
|
|
maxlength=2083 placeholder="https://hostname.example.com" value="" />
|
|
|
|
<div><label for="create_payload_url" generated="true" class="text-error"></label></div>
|
|
|
|
</div>
|
|
|
|
<div class="input-group">
|
2024-04-01 15:48:08 +02:00
|
|
|
<label for="interface_type" class="modal-field-label">{{t "Outgoing webhook message format" }}</label>
|
2023-02-16 11:20:07 +01:00
|
|
|
<select name="interface_type" id="create_interface_type" class="modal_select bootstrap-focus-style">
|
2022-09-15 14:07:39 +02:00
|
|
|
<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>
|
|
|
|
</div>
|
|
|
|
<div id="config_inputbox">
|
2023-03-22 08:52:15 +01:00
|
|
|
{{#each realm_embedded_bots}}
|
|
|
|
{{#each config}}
|
|
|
|
{{> ../embedded_bot_config_item botname=../name key=@key value=this}}
|
2022-09-15 14:07:39 +02:00
|
|
|
{{/each}}
|
|
|
|
{{/each}}
|
|
|
|
</div>
|
|
|
|
<div class="input-group">
|
2024-04-01 15:48:08 +02:00
|
|
|
<label for="bot_avatar_file_input" class="modal-field-label">{{t "Avatar" }}</label>
|
2022-09-15 14:07:39 +02:00
|
|
|
<div id="bot_avatar_file"></div>
|
2022-09-22 11:13:48 +02:00
|
|
|
<input type="file" name="bot_avatar_file_input" class="notvisible" id="bot_avatar_file_input" value="{{t 'Upload avatar' }}" />
|
2023-01-02 19:19:52 +01:00
|
|
|
<div id="add_bot_preview_text">
|
|
|
|
<img id="add_bot_preview_image" />
|
|
|
|
</div>
|
2022-09-22 11:13:48 +02:00
|
|
|
<button class="button white rounded small btn-danger" style="display: none;" id="bot_avatar_clear_button">{{t "Clear avatar" }}</button>
|
|
|
|
<button class="button white rounded" id="bot_avatar_upload_button">{{t "Choose avatar" }}</button> ({{t "Optional" }})
|
2022-09-15 14:07:39 +02:00
|
|
|
</div>
|
|
|
|
<p>
|
|
|
|
<div id="bot_avatar_file_input_error" class="text-error"></div>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</form>
|