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.

realm_creation: Disable `import from` input.

Aman Agrawale36147a94e3a
diff --git a/templates/zerver/realm_creation_form.html b/templates/zerver/realm_creation_form.html
index 637dc3d385c..d43a227d437 100644
--- a/templates/zerver/realm_creation_form.html
+++ b/templates/zerver/realm_creation_form.html
@@ -87,11 +87,16 @@
{% if is_realm_import_enabled %}
<div class="input-box">
<div class="inline-block" id="realm-creation-import-from-wrapper">
- <select id="import_from" name="import_from">
+ <select id="import_from" name="import_from"
+ {% if user_registration_form %}
+ disabled
+ {% endif %}
+ >
{% for key, choice in import_from_choices %}
<option value="{{ key }}" {% if key == "none" %}selected{% endif %}>{{ _(choice) }}</option>
{% endfor %}
</select>
+ {% if not user_registration_form %}
<p class="extra-info-realm-creation-import-from registration-form-hint">
{% trans %}
Learn how to import from
@@ -99,6 +104,7 @@
<a href="/help/import-from-rocketchat">Rocket.Chat</a>.
{% endtrans %}
</p>
+ {% endif %}
</div>
<label for="import_from" class="inline-block">
{{ _('Import chat history?') }}
diff --git a/web/styles/portico/portico_signin.css b/web/styles/portico/portico_signin.css
index 971ec59102c..1697f480f96 100644
--- a/web/styles/portico/portico_signin.css
+++ b/web/styles/portico/portico_signin.css
@@ -1499,6 +1499,10 @@ button#register_auth_button_gitlab {
}
}
+#realm-creation-import-from-wrapper #import_from[disabled] {
+ cursor: not-allowed;
+}
+
#realm-creation-import-from-wrapper .extra-info-realm-creation-import-from {
padding-top: 5px;
}