diff --git a/invenio_app_rdm/config.py b/invenio_app_rdm/config.py index 763259c82..f0bfa11d3 100644 --- a/invenio_app_rdm/config.py +++ b/invenio_app_rdm/config.py @@ -134,6 +134,9 @@ def _(x): THEME_SITENAME = _('InvenioRDM') """Site name.""" +SECURITY_REGISTER_USER_TEMPLATE = 'invenio_app_rdm/sign_up.html' +"""Default template for user registration.""" + # Invenio-Mail / Flask-Mail # ========================= diff --git a/invenio_app_rdm/theme/templates/invenio_app_rdm/sign_up.html b/invenio_app_rdm/theme/templates/invenio_app_rdm/sign_up.html new file mode 100644 index 000000000..ae002dc65 --- /dev/null +++ b/invenio_app_rdm/theme/templates/invenio_app_rdm/sign_up.html @@ -0,0 +1,45 @@ +{# -*- coding: utf-8 -*- + + This file is part of Invenio. + Copyright (C) 2020 CERN. + Copyright (C) 2020 Northwestern University. + + Invenio-App-RDM is free software; you can redistribute it and/or modify it + under the terms of the MIT License; see LICENSE file for more details. + #} + {%- extends config.ACCOUNTS_COVER_TEMPLATE %} + + {% from "invenio_accounts/_macros.html" import render_field, form_errors %} + + {% block panel %} + {%- with form = register_user_form %} +
+
+
+

{% trans sitename=config.ACCOUNTS_SITENAME %}Sign up for an {{ sitename }} account!{% endtrans %}

+
+ {{ form_errors(form) }} + {{ form.hidden_tag() }} + {%- block registration_form_fields scoped %} + {{ render_field(form.email, icon="glyphicon glyphicon-user", autofocus=True, errormsg=False) }} + {{ render_field(form.password, icon="glyphicon glyphicon-lock", errormsg=False) }} + {%- if form.password_confirm %} + {{ render_field(form.password_confirm, icon="glyphicon glyphicon-lock", errormsg=False) }} + {%- endif %} + {%- endblock registration_form_fields %} + {%- if form.recaptcha %} +
{{ form.recaptcha() }}
+ {%- endif %} + +
+
+ +
+
+ {%- endwith %} + {% endblock panel %} \ No newline at end of file