Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

settings: Rename admin-realm-time-limit-input class.

Sahil Batraba1188db050c
diff --git a/frontend_tests/node_tests/settings_org.js b/frontend_tests/node_tests/settings_org.js
index ff72571edcb..40dbe6773b6 100644
--- a/frontend_tests/node_tests/settings_org.js
+++ b/frontend_tests/node_tests/settings_org.js
@@ -551,14 +551,14 @@ test("set_up", ({override, override_rewire}) => {
const $custom_edit_limit_input = $("#id_realm_message_content_edit_limit_minutes");
$stub_message_content_edit_limit_parent.set_find_results(
- ".admin-realm-time-limit-input",
+ ".time-limit-custom-input",
$custom_edit_limit_input,
);
$custom_edit_limit_input.attr("id", "id_realm_message_content_edit_limit_minutes");
const $custom_delete_limit_input = $("#id_realm_message_content_delete_limit_minutes");
$stub_message_content_delete_limit_parent.set_find_results(
- ".admin-realm-time-limit-input",
+ ".time-limit-custom-input",
$custom_delete_limit_input,
);
$custom_delete_limit_input.attr("id", "id_realm_message_content_delete_limit_minutes");
@@ -586,7 +586,7 @@ test("set_up", ({override, override_rewire}) => {
$stub_realm_waiting_period_threshold_parent,
);
$stub_realm_waiting_period_threshold_parent.set_find_results(
- ".admin-realm-time-limit-input",
+ ".time-limit-custom-input",
$realm_waiting_period_threshold_custom_input,
);
$realm_waiting_period_threshold_custom_input.attr(
diff --git a/static/js/settings_org.js b/static/js/settings_org.js
index 5eda2208c7a..fc119012372 100644
--- a/static/js/settings_org.js
+++ b/static/js/settings_org.js
@@ -281,7 +281,7 @@ function update_custom_value_input(property_name) {
const $dropdown_elem = $(`#id_${CSS.escape(property_name)}`);
const custom_input_elem_id = $dropdown_elem
.parent()
- .find(".admin-realm-time-limit-input")
+ .find(".time-limit-custom-input")
.attr("id");
const show_custom_limit_input = $dropdown_elem.val() === "custom_period";
@@ -312,7 +312,7 @@ function set_time_limit_setting(property_name) {
const $custom_input = $(`#id_${CSS.escape(property_name)}`)
.parent()
- .find(".admin-realm-time-limit-input");
+ .find(".time-limit-custom-input");
$custom_input.val(get_realm_time_limits_in_minutes(property_name));
change_element_block_display_property(
@@ -838,7 +838,7 @@ function get_time_limit_setting_value($input_elem, for_api_data = true) {
return Number.parseInt(select_elem_val, 10);
}
- const $custom_input_elem = $input_elem.parent().find(".admin-realm-time-limit-input");
+ const $custom_input_elem = $input_elem.parent().find(".time-limit-custom-input");
if ($custom_input_elem.val().length === 0) {
// This handles the case where the initial setting value is "Any time" and then
// dropdown is changed to "Custom" where the input box is empty initially and
@@ -965,7 +965,7 @@ function enable_or_disable_save_button($subsection_elem) {
let disable_save_btn = false;
for (const setting_elem of time_limit_settings) {
const dropdown_elem_val = $(setting_elem).find("select").val();
- const $custom_input_elem = $(setting_elem).find(".admin-realm-time-limit-input");
+ const $custom_input_elem = $(setting_elem).find(".time-limit-custom-input");
const custom_input_elem_val = Number.parseInt(Number($custom_input_elem.val()), 10);
disable_save_btn =
diff --git a/static/styles/settings.css b/static/styles/settings.css
index f18b16d6117..b41dad70a13 100644
--- a/static/styles/settings.css
+++ b/static/styles/settings.css
@@ -1173,7 +1173,7 @@ $option_title_width: 180px;
overflow: hidden;
border-radius: 4px;
- .admin-realm-time-limit-input {
+ .time-limit-custom-input {
width: 5ch;
text-align: right;
}
diff --git a/static/templates/settings/notification_settings.hbs b/static/templates/settings/notification_settings.hbs
index 54fee0f6471..5205bb341c5 100644
--- a/static/templates/settings/notification_settings.hbs
+++ b/static/templates/settings/notification_settings.hbs
@@ -140,7 +140,7 @@
</label>
<input type="text"
name="email_notification_batching_period_edit_minutes"
- class="email_notification_batching_period_edit_minutes admin-realm-time-limit-input"
+ class="email_notification_batching_period_edit_minutes time-limit-custom-input"
data-setting-widget-type="time-limit"
autocomplete="off"
id="{{prefix}}email_notification_batching_period_edit_minutes"/>
diff --git a/static/templates/settings/organization_permissions_admin.hbs b/static/templates/settings/organization_permissions_admin.hbs
index dc051ae48bc..31519f02456 100644
--- a/static/templates/settings/organization_permissions_admin.hbs
+++ b/static/templates/settings/organization_permissions_admin.hbs
@@ -48,7 +48,7 @@
<label for="id_realm_waiting_period_threshold_custom_input" class="inline-block">{{t "Waiting period (days)" }}:</label>
<input type="text" id="id_realm_waiting_period_threshold_custom_input"
name="realm_waiting_period_threshold_custom_input"
- class="admin-realm-time-limit-input"
+ class="time-limit-custom-input"
value="{{ realm_waiting_period_threshold }}"/>
</div>
</div>
@@ -171,7 +171,7 @@
</label>
<input type="text" id="id_realm_message_content_edit_limit_minutes"
name="realm_message_content_edit_limit_minutes"
- class="admin-realm-time-limit-input"
+ class="time-limit-custom-input"
autocomplete="off"
value="{{ realm_message_content_edit_limit_minutes }}"
{{#unless realm_allow_message_editing}}disabled{{/unless}}/>
@@ -238,7 +238,7 @@
</label>
<input type="text" id="id_realm_message_content_delete_limit_minutes"
name="realm_message_content_delete_limit_minutes"
- class="admin-realm-time-limit-input"
+ class="time-limit-custom-input"
autocomplete="off"
value="{{ realm_message_content_delete_limit_minutes }}"/>
</div>