From 125d0108630ca5777f82c1f11acb977682e652f4 Mon Sep 17 00:00:00 2001 From: Fatimah Zulfiqar Date: Fri, 13 Dec 2024 14:39:35 +0100 Subject: [PATCH] register: added info box for institutional email --- assets/less/zenodo-rdm/modules/popup.overrides | 9 +++++++++ .../invenio_accounts/register_user.html | 15 ++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/assets/less/zenodo-rdm/modules/popup.overrides b/assets/less/zenodo-rdm/modules/popup.overrides index d60171dd..07b70485 100644 --- a/assets/less/zenodo-rdm/modules/popup.overrides +++ b/assets/less/zenodo-rdm/modules/popup.overrides @@ -48,3 +48,12 @@ max-width: 80vw; white-space: break-spaces; } + +.field-info{ + padding: 0.4em !important; + margin-top: -1em !important; + [data-tooltip]::after { + width: 25vw; + white-space: break-spaces; + } +} \ No newline at end of file diff --git a/templates/semantic-ui/invenio_accounts/register_user.html b/templates/semantic-ui/invenio_accounts/register_user.html index 3c5f3275..e402244b 100644 --- a/templates/semantic-ui/invenio_accounts/register_user.html +++ b/templates/semantic-ui/invenio_accounts/register_user.html @@ -1,6 +1,16 @@ {%- extends config.ACCOUNTS_COVER_TEMPLATE %} {% from "invenio_accounts/_macros.html" import render_field, form_errors %} + +{% macro render_field_info(message, tooltip) %} +
+ {{ message }} + + + +
+{% endmacro %} + {% block page_body %}

Research. Shared! Sign up today

@@ -52,7 +62,10 @@

Research. Shared! Sign up today

{{ form.hidden_tag() }} {%- block registration_form_fields scoped %} - {{ render_field(form.email, icon="user icon", autofocus=True, errormsg=False) }} + {{ render_field(form.email, icon="user icon", autofocus=True, errormsg=False) }} + {{ render_field_info(_('Please use an institutional email address'), _('Using an institutional email address helps us verify your account and avoid accidental flagging.')) }} + + {{ render_field(form.password, icon="lock icon", errormsg=False) }} {%- if form.password_confirm %}