settings: Add checkbox for whether message editing is allowed or not.

This commit adds a checkbox for allow_message_editing setting and
thus we also remove the "Never" option from the time limit dropdown
as unchecking the newly added checkbox will mean the same.

We also disable the time limit input if message editing is not
allowed.

This commit also changes the label for time limit dropdown.

Fixes part of #21739.
This commit is contained in:
Sahil Batra
2022-04-12 13:26:58 +05:30
committed by Tim Abbott
parent a1f40ccda5
commit 0c67c7d269
5 changed files with 34 additions and 35 deletions

View File

@@ -52,6 +52,7 @@ const admin_settings_label = {
realm_default_language: $t({
defaultMessage: "Language for automated messages and invitation emails",
}),
realm_allow_message_editing: $t({defaultMessage: "Allow message editing"}),
};
function insert_tip_box() {
@@ -113,6 +114,7 @@ export function build_page() {
),
realm_message_retention_days: page_params.realm_message_retention_days,
realm_allow_edit_history: page_params.realm_allow_edit_history,
realm_allow_message_editing: page_params.realm_allow_message_editing,
language_list,
realm_default_language_name: get_language_name(page_params.realm_default_language),
realm_default_language_code: page_params.realm_default_language,