realm_creation: Disable import from input.

We are not processing this input at the POST endpoint, this
commit just disables the selection from changing.

It is not easy to process changing "import from" at this stage,
but we can possible allow that in a future refactor.
This commit is contained in:
Aman Agrawal
2025-09-01 13:03:16 +05:30
committed by Tim Abbott
parent f45552fadd
commit e36147a94e
2 changed files with 11 additions and 1 deletions

View File

@@ -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?') }}

View File

@@ -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;
}