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.

modals: Fix extra bottom margin due to default form styling.

Sayam Samalda4a004481ec
diff --git a/web/styles/modal.css b/web/styles/modal.css
index 8aab6971d93..07a532f5e92 100644
--- a/web/styles/modal.css
+++ b/web/styles/modal.css
@@ -1003,6 +1003,11 @@ ul.modal-options-list {
margin-bottom: 0;
}
+.modal__content .modal-form {
+ /* Override default value for form in bootstrap.app.css */
+ margin-bottom: 0;
+}
+
/* ==============================================================
* END MODAL MARGIN OVERRIDES
* ============================================================== */
diff --git a/web/styles/settings.css b/web/styles/settings.css
index 703ec4457c3..5737597bfd9 100644
--- a/web/styles/settings.css
+++ b/web/styles/settings.css
@@ -96,12 +96,6 @@ h3,
max-width: 90%;
}
-#change_email_modal {
- #change_email_form {
- margin: 0;
- }
-}
-
.disabled_setting_tooltip {
cursor: not-allowed;
}
@@ -962,10 +956,6 @@ input[type="checkbox"] {
}
#add-custom-emoji-modal {
- & form {
- margin: 0;
- }
-
& input[type="text"] {
padding: 6px;
}
@@ -1075,7 +1065,6 @@ input[type="checkbox"] {
.edit_bot_form {
font-size: 100%;
- margin: 0;
padding: 0;
.buttons {
@@ -1153,12 +1142,6 @@ input[type="checkbox"] {
}
}
-#change_password_modal {
- #change_password_container {
- margin: 0;
- }
-}
-
#api_key_status {
margin: 0 0 10px;
}
diff --git a/web/templates/add_poll_modal.hbs b/web/templates/add_poll_modal.hbs
index c968930a8d5..2936d7e7eaf 100644
--- a/web/templates/add_poll_modal.hbs
+++ b/web/templates/add_poll_modal.hbs
@@ -1,4 +1,4 @@
-<form id="add-poll-form">
+<form class="modal-form" id="add-poll-form">
<label class="poll-label">{{t "Question"}}</label>
<div class="poll-question-input-container">
<input type="text" id="poll-question-input" autocomplete="off" class="modal_text_input" placeholder="{{t 'Your question'}}" />
diff --git a/web/templates/add_saved_snippet_modal.hbs b/web/templates/add_saved_snippet_modal.hbs
index 439e74653fb..7adb6acc9d9 100644
--- a/web/templates/add_saved_snippet_modal.hbs
+++ b/web/templates/add_saved_snippet_modal.hbs
@@ -1,5 +1,5 @@
<div id="add-new-saved-snippet-modal">
- <form id="add-new-saved-snippet-form">
+ <form class="modal-form" id="add-new-saved-snippet-form">
<label for="title" class="modal-field-label">{{t "Title" }}</label>
<input id="new-saved-snippet-title" type="text" name="title" class="modal_text_input saved-snippet-title" value="" autocomplete="off" spellcheck="false" autofocus="autofocus"/>
<div>{{t "Content" }}</div>
diff --git a/web/templates/add_todo_list_modal.hbs b/web/templates/add_todo_list_modal.hbs
index 25c654e36a2..f87191851c7 100644
--- a/web/templates/add_todo_list_modal.hbs
+++ b/web/templates/add_todo_list_modal.hbs
@@ -1,4 +1,4 @@
-<form id="add-todo-form" class="new-style">
+<form class="modal-form" id="add-todo-form" class="new-style">
<label class="todo-label">{{t "To-do list title" }}</label>
<div class="todo-title-input-container">
<input type="text" id="todo-title-input" autocomplete="off" value="{{t 'Task list' }}" class="modal_text_input" />
diff --git a/web/templates/change_email_modal.hbs b/web/templates/change_email_modal.hbs
index 10f9e59275a..d39233f2463 100644
--- a/web/templates/change_email_modal.hbs
+++ b/web/templates/change_email_modal.hbs
@@ -1,4 +1,4 @@
-<form id="change_email_form">
+<form class="modal-form" id="change_email_form">
<p>{{t "You will receive a confirmation email at the new address you enter."}}</p>
<label for="change-email-form-input-email" class="modal-field-label">{{t "New email" }}</label>
<input id="change-email-form-input-email" type="text" name="email" class="modal_text_input" value="{{delivery_email}}" autocomplete="off" spellcheck="false" autofocus="autofocus"/>
diff --git a/web/templates/demo_organization_add_email_modal.hbs b/web/templates/demo_organization_add_email_modal.hbs
index a8c7804a5e7..f0c302833ad 100644
--- a/web/templates/demo_organization_add_email_modal.hbs
+++ b/web/templates/demo_organization_add_email_modal.hbs
@@ -1,4 +1,4 @@
-<form id="demo_organization_add_email_form">
+<form class="modal-form" id="demo_organization_add_email_form">
<div class="input-group">
<label for="demo_organization_add_email" class="modal-field-label">{{t "Email" }}</label>
<input id="demo_organization_add_email" type="text" name="email" class="modal_text_input" value="{{delivery_email}}" autocomplete="off" spellcheck="false" autofocus="autofocus"/>
diff --git a/web/templates/dialog_change_password.hbs b/web/templates/dialog_change_password.hbs
index a79c6eecd5a..cee03790c73 100644
--- a/web/templates/dialog_change_password.hbs
+++ b/web/templates/dialog_change_password.hbs
@@ -1,4 +1,4 @@
-<form id="change_password_container">
+<form class="modal-form" id="change_password_container">
<div class="settings-password-div">
<label for="old_password" class="modal-field-label">{{t "Old password" }}</label>
<div class="password-input-row">
diff --git a/web/templates/edit_saved_snippet_modal.hbs b/web/templates/edit_saved_snippet_modal.hbs
index f1ba941c7ed..fe18e6aa8ba 100644
--- a/web/templates/edit_saved_snippet_modal.hbs
+++ b/web/templates/edit_saved_snippet_modal.hbs
@@ -1,5 +1,5 @@
<div id="edit-saved-snippet-modal">
- <form id="edit-saved-snippet-form">
+ <form class="modal-form" id="edit-saved-snippet-form">
<label for="title" class="modal-field-label">{{t "Title" }}</label>
<input id="edit-saved-snippet-title" type="text" name="title" class="modal_text_input saved-snippet-title" value="{{title}}" autocomplete="off" spellcheck="false" autofocus="autofocus"/>
<div>{{t "Content" }}</div>
diff --git a/web/templates/report_message_modal.hbs b/web/templates/report_message_modal.hbs
index c00ac9dcbea..2e0d5a32a24 100644
--- a/web/templates/report_message_modal.hbs
+++ b/web/templates/report_message_modal.hbs
@@ -1,4 +1,4 @@
-<form id="message_report_form">
+<form class="modal-form" id="message_report_form">
<p>
{{t "Your report will be sent to the private moderation requests channel for this organization." }}
</p>
diff --git a/web/templates/settings/add_alert_word.hbs b/web/templates/settings/add_alert_word.hbs
index d3ac62061a8..28bb1ce9688 100644
--- a/web/templates/settings/add_alert_word.hbs
+++ b/web/templates/settings/add_alert_word.hbs
@@ -1,4 +1,4 @@
-<form id="add-alert-word-form">
+<form class="modal-form" id="add-alert-word-form">
<label for="add-alert-word-name" class="modal-field-label">{{t "Alert word" }}</label>
<input type="text" name="alert-word-name" id="add-alert-word-name" class="required modal_text_input" maxlength=100 placeholder="{{t 'Alert word' }}" value="" />
</form>
diff --git a/web/templates/settings/add_emoji.hbs b/web/templates/settings/add_emoji.hbs
index df82106e959..801d83b5236 100644
--- a/web/templates/settings/add_emoji.hbs
+++ b/web/templates/settings/add_emoji.hbs
@@ -1,4 +1,4 @@
-<form id="add-custom-emoji-form">
+<form class="modal-form" id="add-custom-emoji-form">
<div>
<input type="file" name="emoji_file_input" class="notvisible"
id="emoji_file_input" value="{{t 'Upload image or GIF' }}"/>
diff --git a/web/templates/settings/add_new_bot_form.hbs b/web/templates/settings/add_new_bot_form.hbs
index f583ad2c7b0..c9d1f99e49b 100644
--- a/web/templates/settings/add_new_bot_form.hbs
+++ b/web/templates/settings/add_new_bot_form.hbs
@@ -1,4 +1,4 @@
-<form id="create_bot_form">
+<form class="modal-form" id="create_bot_form">
<div class="new-bot-form">
<div class="input-group">
<label for="create_bot_type" class="modal-field-label">
diff --git a/web/templates/settings/add_new_custom_profile_field_form.hbs b/web/templates/settings/add_new_custom_profile_field_form.hbs
index 3959ede25d1..5efea14d6cd 100644
--- a/web/templates/settings/add_new_custom_profile_field_form.hbs
+++ b/web/templates/settings/add_new_custom_profile_field_form.hbs
@@ -1,4 +1,4 @@
-<form class="admin-profile-field-form" id="add-new-custom-profile-field-form">
+<form class="admin-profile-field-form modal-form" id="add-new-custom-profile-field-form">
<div class="new-profile-field-form wrapper">
<div class="input-group">
<label for="profile_field_type" class="modal-field-label">{{t "Type" }}</label>
diff --git a/web/templates/settings/admin_linkifier_edit_form.hbs b/web/templates/settings/admin_linkifier_edit_form.hbs
index f751ad9b5c0..c7f234de6f2 100644
--- a/web/templates/settings/admin_linkifier_edit_form.hbs
+++ b/web/templates/settings/admin_linkifier_edit_form.hbs
@@ -1,5 +1,5 @@
<div id="edit-linkifier-form">
- <form class="linkifier-edit-form">
+ <form class="linkifier-edit-form modal-form">
<div class="input-group name_change_container">
<label for="edit-linkifier-pattern" class="modal-field-label">{{t "Pattern" }}</label>
<input type="text" autocomplete="off" id="edit-linkifier-pattern" class="modal_text_input" name="pattern" placeholder="#(?P<id>[0-9]+)" value="{{ pattern }}" />
diff --git a/web/templates/settings/convert_demo_organization_form.hbs b/web/templates/settings/convert_demo_organization_form.hbs
index 9ca605b90a7..f0c7af21350 100644
--- a/web/templates/settings/convert_demo_organization_form.hbs
+++ b/web/templates/settings/convert_demo_organization_form.hbs
@@ -3,7 +3,7 @@
<div class="demo-organization-add-email-banner banner-wrapper"></div>
{{/unless}}
<p>{{t "Everyone will need to log in again at the new URL for your organization." }}</p>
- <form class="subdomain-setting">
+ <form class="subdomain-setting modal-form">
<div class="input-group">
<label for="string_id" class="inline-block modal-field-label">{{t "Organization URL" }}</label>
<div id="subdomain_input_container">
diff --git a/web/templates/settings/edit_bot_form.hbs b/web/templates/settings/edit_bot_form.hbs
index 445bcbf91eb..6b47ec57130 100644
--- a/web/templates/settings/edit_bot_form.hbs
+++ b/web/templates/settings/edit_bot_form.hbs
@@ -1,5 +1,5 @@
<div id="bot-edit-form" data-user-id="{{user_id}}" data-email="{{email}}">
- <form class="edit_bot_form name-setting">
+ <form class="edit_bot_form name-setting modal-form">
<div id="bot-edit-form-error" class="banner-wrapper"></div>
<div class="input-group name_change_container">
<label for="edit_bot_full_name" class="modal-field-label">{{t "Name" }}</label>
diff --git a/web/templates/settings/edit_custom_profile_field_form.hbs b/web/templates/settings/edit_custom_profile_field_form.hbs
index 3a27082b67e..b9cb75340b6 100644
--- a/web/templates/settings/edit_custom_profile_field_form.hbs
+++ b/web/templates/settings/edit_custom_profile_field_form.hbs
@@ -1,5 +1,5 @@
{{#with profile_field_info}}
-<form class="name-setting profile-field-form" id="edit-custom-profile-field-form-{{id}}" data-profile-field-id="{{id}}">
+<form class="name-setting profile-field-form modal-form" id="edit-custom-profile-field-form-{{id}}" data-profile-field-id="{{id}}">
<div class="input-group">
<label for="id-custom-profile-field-name" class="modal-field-label">{{t "Label" }}</label>
<input type="text" name="name" id="id-custom-profile-field-name" class="modal_text_input prop-element" value="{{ name }}" maxlength="40" data-setting-widget-type="string" />
diff --git a/web/templates/start_export_modal.hbs b/web/templates/start_export_modal.hbs
index e95cb54fb80..84c94c34eef 100644
--- a/web/templates/start_export_modal.hbs
+++ b/web/templates/start_export_modal.hbs
@@ -1,5 +1,5 @@
<p id="allow_private_data_export_banner_container"></p>
-<form id="start-export-form">
+<form class="modal-form" id="start-export-form">
<div class="input-group">
<label for="export_type" class="modal-field-label">{{t "Data to export" }} {{> help_link_widget link="/help/export-your-organization" }}</label>
<select id="export_type" class="modal_select bootstrap-focus-style">