settings: Refactor code for waiting period setting.

This commit refactors code for realm waiting period setting
to be similar to other time-based inputs. We also add the
code to disable the save button when custom inputs have
invalid values.
This commit is contained in:
Sahil Batra
2022-12-12 22:51:08 +05:30
committed by Tim Abbott
parent bc5f0e881e
commit 565d133985
5 changed files with 67 additions and 45 deletions

View File

@@ -155,6 +155,8 @@ export function build_page() {
msg_delete_limit_dropdown_values: settings_config.msg_delete_limit_dropdown_values,
bot_creation_policy_values: settings_bots.bot_creation_policy_values,
email_address_visibility_values: settings_config.email_address_visibility_values,
waiting_period_threshold_dropdown_values:
settings_config.waiting_period_threshold_dropdown_values,
can_invite_others_to_realm: settings_data.user_can_invite_others_to_realm(),
realm_invite_required: page_params.realm_invite_required,
can_edit_user_groups: settings_data.user_can_edit_user_groups(),