From ec4e5e73abf843f985812fbf0a6719f025cd078b Mon Sep 17 00:00:00 2001 From: Shubham Dhama Date: Wed, 2 May 2018 22:32:51 +0530 Subject: [PATCH] org settings: Make time limit input elements inline to dropdown. (To make the capitalization pass we added `N` to ignored phrases.) --- static/js/settings_org.js | 2 +- static/styles/settings.scss | 14 ++++-- .../organization-permissions-admin.handlebars | 2 +- .../organization-settings-admin.handlebars | 48 +++++++++---------- tools/lib/capitalization.py | 2 + 5 files changed, 39 insertions(+), 29 deletions(-) diff --git a/static/js/settings_org.js b/static/js/settings_org.js index 5102801105..53e84ef154 100644 --- a/static/js/settings_org.js +++ b/static/js/settings_org.js @@ -220,7 +220,7 @@ exports.setup_time_limit_dropdown_values = function () { seconds: 7*24*60*60, }, custom_limit: { - text: i18n.t("Custom time limit after posting"), + text: i18n.t("Up to N minutes after posting"), }, }; exports.msg_edit_limit_dropdown_values = time_limit_dropdown_values; diff --git a/static/styles/settings.scss b/static/styles/settings.scss index 52e3a34964..b825d09d2a 100644 --- a/static/styles/settings.scss +++ b/static/styles/settings.scss @@ -337,6 +337,11 @@ td .button { margin: -5px 0 15px 35px; } +.dependent-inline-block { + display: inline-block; + margin: 0 0 0 10px !important; +} + .no-margin { margin: 0px; } @@ -606,11 +611,15 @@ input[type=checkbox].inline-block { margin-top: -10px; } -.admin-realm-message-content-edit-limit-minutes { +#settings_page .admin-realm-time-limit-input { width: 5ch; text-align: right; } +#settings_page .realm-time-limit-label { + vertical-align: middle; +} + .admin-realm-message-content-delete-limit-minutes { width: 5ch; text-align: right; @@ -1380,8 +1389,7 @@ input[type=checkbox].inline-block { #id_realm_create_stream_permission, #id_realm_org_join_restrictions, #id_realm_bot_creation_policy, -#id_realm_user_invite_restriction, -#id_realm_msg_edit_limit_setting { +#id_realm_user_invite_restriction { width: 100%; } diff --git a/static/templates/settings/organization-permissions-admin.handlebars b/static/templates/settings/organization-permissions-admin.handlebars index 1c90e71d7f..9501ce0ab6 100644 --- a/static/templates/settings/organization-permissions-admin.handlebars +++ b/static/templates/settings/organization-permissions-admin.handlebars @@ -74,7 +74,7 @@ diff --git a/static/templates/settings/organization-settings-admin.handlebars b/static/templates/settings/organization-settings-admin.handlebars index f633f62287..78c2c7731b 100644 --- a/static/templates/settings/organization-settings-admin.handlebars +++ b/static/templates/settings/organization-settings-admin.handlebars @@ -17,16 +17,15 @@ {{/each}} - - -
- - +
+ + +
{{partial "settings_checkbox" @@ -36,24 +35,25 @@ "label" admin_settings_label.realm_allow_community_topic_editing}}
- - - {{#each msg_delete_limit_dropdown_values}} {{/each}} -
- -
- - +
+ + +
{{partial "settings_checkbox" diff --git a/tools/lib/capitalization.py b/tools/lib/capitalization.py index 8fee8e6d20..87194da5bc 100644 --- a/tools/lib/capitalization.py +++ b/tools/lib/capitalization.py @@ -108,6 +108,8 @@ IGNORED_PHRASES = [ r"^marketing$", r"^cookie$", r"^new_emoji$", + # Used to refer custom time limits + r"\bN\b", # TO CLEAN UP # Just want to avoid churning login.html right now