diff --git a/app/models/user.py b/app/models/user.py index c0e954351d..aa89712628 100644 --- a/app/models/user.py +++ b/app/models/user.py @@ -56,6 +56,10 @@ def __init__(self, _dict): self.max_failed_login_count = current_app.config["MAX_FAILED_LOGIN_COUNT"] self._platform_admin = _dict["platform_admin"] + @property + def default_editor_is_rte(self): + return self._dict.get("default_editor_is_rte") + @classmethod def from_id(cls, user_id): return cls(user_api_client.get_user(user_id)) diff --git a/app/templates/views/find-users/user-information.html b/app/templates/views/find-users/user-information.html index e91e8c24a6..fd7ffe1613 100644 --- a/app/templates/views/find-users/user-information.html +++ b/app/templates/views/find-users/user-information.html @@ -1,5 +1,6 @@ {% extends "views/platform-admin/_base_template.html" %} {% from "components/page-footer.html" import page_footer %} +{% from "components/badge.html" import badge %} {% block per_page_title %} {{ _('User information for') }} {{ user.name }} @@ -13,6 +14,14 @@

{{ user.email_address }}

{{ user.mobile_number or 'No mobile number'}}

+

{{ _('Default editor') }}

+ {% if user.default_editor_is_rte is sameas true %} + {{ badge(_('😎 Rich text editor'), variant='green', testid='default-editor-badge') }} + {% elif user.default_editor_is_rte is sameas false %} + {{ badge(_('😒 Markdown editor'), variant='gray', testid='default-editor-badge') }} + {% else %} + {{ badge(_('Unknown'), variant='yellow', testid='default-editor-badge') }} + {% endif %}

{{ _('Live services') }}