zulip/web/templates/settings/edit_bot_form.hbs

56 lines
3.2 KiB
Handlebars

<div id="bot-edit-form" data-user-id="{{user_id}}" data-email="{{email}}">
<form class="new-style edit_bot_form name-setting">
<div class="input-group name_change_container">
<label for="edit_bot_full_name">{{t "Name" }}</label>
<input type="text" autocomplete="off" name="full_name" id="edit_bot_full_name" class="modal_text_input" value="{{ full_name }}" />
</div>
<input type="hidden" name="is_full_name" value="true" />
<div class="input-group email_change_container">
<label for="email">{{t "Email" }}</label>
<input type="text" autocomplete="off" name="email" class="modal_text_input" value="{{ email }}" readonly/>
</div>
<div class="input-group user_id_container">
<label for="user_id">{{t "User ID" }}</label>
<input type="text" autocomplete="off" name="user_id" class="modal_text_input" value="{{ user_id }}" readonly/>
</div>
<div class="input-group">
<label class="input-label" for="bot-role-select">{{t 'Role' }}
{{> ../help_link_widget link="/help/roles-and-permissions" }}
</label>
<select name="bot-role-select" id="bot-role-select" class="modal_select bootstrap-focus-style" data-setting-widget-type="number" {{#if disable_role_dropdown}}disabled{{/if}}>
{{> dropdown_options_widget option_values=user_role_values}}
</select>
</div>
<div class="input-group edit_bot_owner_container">
<label for="bot_owner_dropdown_widget">{{t "Owner" }}</label>
<div id="bot_owner_dropdown_widget" class="dropdown-widget-button" role="button" tabindex="0">
<input type="hidden" name="bot_owner_id" class="bot_owner_id" value="{{current_bot_owner}}"/>
<span class="bot_owner_name">
{{owner_full_name}}
</span>
<i class="fa fa-chevron-down"></i>
</div>
</div>
<div id="service_data">
</div>
<div class="input-group edit-avatar-section">
<label>Avatar</label>
{{!-- Shows the current avatar --}}
<img src="{{bot_avatar_url}}" id="current_bot_avatar_image" />
<input type="file" name="bot_avatar_file_input" class="notvisible edit_bot_avatar_file_input" value="{{t 'Upload profile picture' }}" />
<div class="edit_bot_avatar_file"></div>
<div class="edit_bot_avatar_preview_text">
<img class="edit_bot_avatar_preview_image" />
</div>
<button type="button" class="button white rounded edit_bot_avatar_upload_button">{{t "Change avatar" }}</button>
<button type="button" class="button white rounded edit_bot_avatar_clear_button" style="display: none;">{{t "Clear profile picture" }}</button>
<div><label for="edit_bot_avatar_file" generated="true" class="edit_bot_avatar_error text-error"></label></div>
</div>
</form>
<div class="input-group new-style">
<button class="button rounded btn-danger deactivate_bot_button">
{{t 'Deactivate bot' }}
</button>
</div>
</div>