mirror of https://github.com/zulip/zulip.git
org settings: Remove strikethrough from deactivated-user setting.
Remove strickethrough and append text to user role.
This commit is contained in:
parent
1880075f81
commit
6fddc86cf2
|
@ -16,25 +16,36 @@ function get_user_info_row(user_id) {
|
|||
|
||||
function update_view_on_deactivate(row) {
|
||||
var button = row.find("button.deactivate");
|
||||
var user_role = row.find(".user_role");
|
||||
button.prop("disabled", false);
|
||||
row.find('button.open-user-form').hide();
|
||||
button.addClass("btn-warning");
|
||||
button.removeClass("btn-danger");
|
||||
button.addClass("reactivate");
|
||||
button.removeClass("deactivate");
|
||||
row.find('i.deactivated-user-icon').show();
|
||||
button.addClass("btn-warning reactivate");
|
||||
button.removeClass("deactivate btn-danger");
|
||||
button.text(i18n.t("Reactivate"));
|
||||
row.addClass("deactivated_user");
|
||||
|
||||
if (user_role) {
|
||||
var user_id = row.data('user-id');
|
||||
user_role.text("%state (%role)".replace("%state", i18n.t("Deactivated")).
|
||||
replace("%role", people.get_user_type(user_id)));
|
||||
}
|
||||
}
|
||||
|
||||
function update_view_on_reactivate(row) {
|
||||
var button = row.find("button.reactivate");
|
||||
var user_role = row.find(".user_role");
|
||||
row.find("button.open-user-form").show();
|
||||
button.addClass("btn-danger");
|
||||
button.removeClass("btn-warning");
|
||||
button.addClass("deactivate");
|
||||
button.removeClass("reactivate");
|
||||
row.find('i.deactivated-user-icon').hide();
|
||||
button.addClass("btn-danger deactivate");
|
||||
button.removeClass("btn-warning reactivate");
|
||||
button.text(i18n.t("Deactivate"));
|
||||
row.removeClass("deactivated_user");
|
||||
|
||||
if (user_role) {
|
||||
var user_id = row.data('user-id');
|
||||
user_role.text(people.get_user_type(user_id));
|
||||
}
|
||||
}
|
||||
|
||||
function get_status_field() {
|
||||
|
|
|
@ -2931,9 +2931,10 @@ div.topic_edit_spinner .loading_indicator_spinner {
|
|||
margin-right: 25px;
|
||||
}
|
||||
|
||||
.deactivated_user .user_name,
|
||||
.deactivated_user .email {
|
||||
text-decoration: line-through;
|
||||
.deactivated_user .deactivated-user-icon {
|
||||
color: inherit;
|
||||
margin-left: 2px;
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
.no-drag {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<tr class="user_row{{#unless is_active}} deactivated_user{{/unless}}" data-user-id="{{user_id}}" data-email="{{email}}">
|
||||
<td>
|
||||
<span class="user_name">{{full_name}}</span>
|
||||
<i class="fa fa-ban deactivated-user-icon" title="{{t 'User is deactivated' }}" {{#if is_active}}style="display: none;"{{/if}}></i>
|
||||
</td>
|
||||
<td>
|
||||
{{#if ../can_modify}}
|
||||
|
|
Loading…
Reference in New Issue