2021-06-28 13:48:38 +02:00
|
|
|
<div id="edit-user-form" data-user-id="{{user_id}}">
|
2023-01-10 16:04:43 +01:00
|
|
|
<form class="name-setting">
|
settings_users: Migrate manage user modal to full profile modal.
This commit migrates the "manage user" modal to the "Full Profile"
modal. Refactored the show_edit_user_info_modal function since
earlier, we used to have a separate "Manage User" modal.
Consequently, we checked if we were coming from the
user_info_popover and then built the dialog widget accordingly.
However, with this new change, we no longer need to build the
dialog widget. Therefore, removed that part and now just pass
the container of the 'user profile modal' to get the content.
Previously, for deactivation, we used to have a separate dialog
widget. But now, since we have a dedicated function to handle
this case, refactored the deactivation code to use the
'confirm_deactivation' function.
Additionally, created two new functions to handle the loading
spinner. Since we will need these functions in the future for
the "Manage Bot" modal, we marked them as exported.
"Since we do not want to show the 'Manage User' tab to the user
looking at their own profile, in the 'can_manage_user' function
that we use to render the 'Manage User' tab, we check if the user
profile popover belongs to the same user. If it does, we set it to
'false' instead of 'true,' ensuring that the 'Manage User' tab is
not visible.
Added a new tab in the user profile modal 'manage user'.
Fixes: #21806
2023-09-09 12:42:04 +02:00
|
|
|
<div class="alert" id="edit-user-form-error"></div>
|
2021-06-09 19:43:01 +02:00
|
|
|
<input type="hidden" name="is_full_name" value="true" />
|
|
|
|
<div class="input-group name_change_container">
|
2022-07-15 13:45:46 +02:00
|
|
|
<label for="edit_user_full_name">{{t "Full name" }}</label>
|
2023-03-28 13:13:20 +02:00
|
|
|
<input type="text" autocomplete="off" name="full_name" id="edit_user_full_name" class="modal_text_input" value="{{ full_name }}" />
|
2018-07-14 12:43:04 +02:00
|
|
|
</div>
|
2022-03-01 09:00:14 +01:00
|
|
|
{{#if email}}
|
2021-06-09 19:43:01 +02:00
|
|
|
<div class="input-group email_change_container">
|
|
|
|
<label for="email">{{t "Email" }}</label>
|
2023-03-28 13:13:20 +02:00
|
|
|
<input type="text" autocomplete="off" name="email" class="modal_text_input" value="{{ email }}" readonly/>
|
2021-06-09 19:43:01 +02:00
|
|
|
</div>
|
2022-03-01 09:00:14 +01:00
|
|
|
{{/if}}
|
2021-10-28 09:57:45 +02:00
|
|
|
<div class="input-group user_id_container">
|
|
|
|
<label for="user_id">{{t "User ID" }}</label>
|
2023-03-28 13:13:20 +02:00
|
|
|
<input type="text" autocomplete="off" name="user_id" class="modal_text_input" value="{{ user_id }}" readonly/>
|
2021-10-28 09:57:45 +02:00
|
|
|
</div>
|
2021-06-09 19:43:01 +02:00
|
|
|
<div class="input-group">
|
|
|
|
<label class="input-label" for="user-role-select">{{t 'User role' }}
|
|
|
|
{{> ../help_link_widget link="/help/roles-and-permissions" }}
|
|
|
|
</label>
|
2023-02-16 11:20:07 +01:00
|
|
|
<select name="user-role-select" class="bootstrap-focus-style modal_select" id="user-role-select" data-setting-widget-type="number" {{#if disable_role_dropdown}}disabled{{/if}}>
|
2021-06-09 19:43:01 +02:00
|
|
|
{{> dropdown_options_widget option_values=user_role_values}}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<div class="custom-profile-field-form"></div>
|
|
|
|
</form>
|
2022-09-15 12:00:09 +02:00
|
|
|
<div class="input-group new-style">
|
2023-09-27 08:41:31 +02:00
|
|
|
{{#if is_active}}
|
2023-07-20 15:16:21 +02:00
|
|
|
<span {{#if owner_is_only_user_in_organization}}class="deactivate_user_button_tooltip"{{/if}}>
|
|
|
|
<button class="button rounded btn-danger deactivate_user_button" {{#if owner_is_only_user_in_organization}}disabled="disabled"{{/if}}>
|
|
|
|
{{t 'Deactivate user' }}
|
|
|
|
</button>
|
|
|
|
</span>
|
2023-09-27 08:41:31 +02:00
|
|
|
{{else}}
|
|
|
|
<span>
|
|
|
|
<button class="button rounded reactivate_user_button">
|
|
|
|
{{t 'Reactivate user' }}
|
|
|
|
</button>
|
|
|
|
</span>
|
|
|
|
{{/if}}
|
2022-09-15 12:00:09 +02:00
|
|
|
</div>
|
2018-07-14 12:43:04 +02:00
|
|
|
</div>
|