mirror of
				https://github.com/zulip/zulip.git
				synced 2025-10-31 12:03:46 +00:00 
			
		
		
		
	create_realm: Show import text only if automated import is disabled.
This helps preserve the original form in production. The new "Import from" option button allows user to automate the process, so this is not required in that case.
This commit is contained in:
		| @@ -47,6 +47,7 @@ | ||||
|                     </div> | ||||
|                 </form> | ||||
|             </div> | ||||
|             {% if not is_realm_import_enabled %} | ||||
|             <div class="bottom-text"> | ||||
|                 {% trans %} | ||||
|                 Or import | ||||
| @@ -54,6 +55,7 @@ | ||||
|                 or <a href="/help/import-from-rocketchat">Rocket.Chat</a>. | ||||
|                 {% endtrans %} | ||||
|             </div> | ||||
|             {% endif %} | ||||
|         </div> | ||||
|     </div> | ||||
| </div> | ||||
|   | ||||
| @@ -283,6 +283,10 @@ def latest_info_context() -> dict[str, str]: | ||||
|     return context | ||||
|  | ||||
|  | ||||
| def is_realm_import_enabled() -> bool: | ||||
|     return settings.MAX_WEB_DATA_IMPORT_SIZE_MB != 0 | ||||
|  | ||||
|  | ||||
| def get_realm_create_form_context() -> dict[str, Any]: | ||||
|     context = { | ||||
|         "language_list": get_language_list(), | ||||
| @@ -290,5 +294,6 @@ def get_realm_create_form_context() -> dict[str, Any]: | ||||
|         "MAX_REALM_SUBDOMAIN_LENGTH": str(Realm.MAX_REALM_SUBDOMAIN_LENGTH), | ||||
|         "root_domain_available": is_root_domain_available(), | ||||
|         "sorted_realm_types": sorted(Realm.ORG_TYPES.values(), key=lambda d: d["display_order"]), | ||||
|         "is_realm_import_enabled": is_realm_import_enabled(), | ||||
|     } | ||||
|     return context | ||||
|   | ||||
		Reference in New Issue
	
	Block a user