From 802deb17618ea37af5b188e4ebe6ca51af2f41f5 Mon Sep 17 00:00:00 2001 From: Sahil Batra Date: Tue, 10 Jan 2023 20:34:43 +0530 Subject: [PATCH] settings: Remove form-horizontal class from modal templates. This commit removes form-horizontal class from various modal templates. We add CSS for margin-bottom property for select and input elements to keep the design same as before. Most of the added CSS can be removed once we remove bootstrap CSS completely for these elements. We can safely remove this class since vertical-align property is already present due to other bootstrap CSS. And margin-bottom property for checkbox inputs are added by bootstrap and for text inputs inside ".new-style" element it is handled in app_components.css. For other inputs, this commit adds CSS as mentioned above. The display property for inputs other than checkbox and select elements is set to inline-block by other bootstrap CSS. For checkbox-type inputs browser sets display property to inline-block but it is eventually computed to "block" as the float property is set to left and so it is not required to set display property for checkbox type inputs. --- static/styles/settings.css | 23 +++++++++++++++++++ static/templates/settings/add_alert_word.hbs | 2 +- .../templates/settings/add_new_bot_form.hbs | 2 +- .../add_new_custom_profile_field_form.hbs | 2 +- .../templates/settings/admin_human_form.hbs | 2 +- .../settings/admin_linkifier_edit_form.hbs | 2 +- static/templates/settings/edit_bot_form.hbs | 2 +- .../edit_custom_profile_field_form.hbs | 2 +- 8 files changed, 30 insertions(+), 7 deletions(-) diff --git a/static/styles/settings.css b/static/styles/settings.css index fb07b72509..9933fa75ee 100644 --- a/static/styles/settings.css +++ b/static/styles/settings.css @@ -868,12 +868,20 @@ input[type="checkbox"] { #bot-role-select:disabled { opacity: 1; } + + select { + margin-bottom: 0; + } } #add-alert-word { form { margin-bottom: 4px; } + + input { + margin-bottom: 0; + } } .admin-linkifier-form, @@ -1851,6 +1859,17 @@ $option_title_width: 180px; #edit-linkifier-format-status { margin-top: 10px; } + + input { + margin-bottom: 0; + } +} + +#edit-user-form, +#create-bot-form { + select { + margin-bottom: 0; + } } .settings_panel_list_header { @@ -1874,4 +1893,8 @@ $option_title_width: 180px; cursor: default; opacity: 0.7; } + + select { + margin-bottom: 0; + } } diff --git a/static/templates/settings/add_alert_word.hbs b/static/templates/settings/add_alert_word.hbs index 3e758bca69..65b382b1aa 100644 --- a/static/templates/settings/add_alert_word.hbs +++ b/static/templates/settings/add_alert_word.hbs @@ -1,4 +1,4 @@ -
+
diff --git a/static/templates/settings/add_new_bot_form.hbs b/static/templates/settings/add_new_bot_form.hbs index eaa25c28f5..24d8c03006 100644 --- a/static/templates/settings/add_new_bot_form.hbs +++ b/static/templates/settings/add_new_bot_form.hbs @@ -1,4 +1,4 @@ -
+