From 756a150438d88a0c8ac7c1f8c7b5e2633d601eb5 Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Fri, 14 Feb 2025 14:56:07 +0000 Subject: [PATCH] Added custom template for disabling oauth on login page --- docker-compose.yaml | 1 + .../invenio_app_rdm/login_user.html | 55 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 invenio_templates/semantic-ui/invenio_app_rdm/login_user.html diff --git a/docker-compose.yaml b/docker-compose.yaml index 73a8fdb..eca1df4 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -35,6 +35,7 @@ services: - uploaded_data:/opt/invenio/var/instance/data - archived_data:/opt/invenio/var/instance/archive - ./invenio_assets:/opt/invenio/var/instance/static/custom_assets # Add static assets for theming + - ./invenio_templates:/opt/invenio/var/instance/templates # Add static assets for theming environment: # Flask - INVENIO_APP_ALLOWED_HOSTS=${INVENIO_APP_ALLOWED_HOSTS:-['0.0.0.0', 'localhost', '127.0.0.1']} diff --git a/invenio_templates/semantic-ui/invenio_app_rdm/login_user.html b/invenio_templates/semantic-ui/invenio_app_rdm/login_user.html new file mode 100644 index 0000000..4d5836a --- /dev/null +++ b/invenio_templates/semantic-ui/invenio_app_rdm/login_user.html @@ -0,0 +1,55 @@ +{# -*- coding: utf-8 -*- + +This file is part of Invenio. +Copyright (C) 2015-2020 CERN. +Copyright (C) 2021 TU Wien. + +Invenio 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 page_body %} +
+ + + {%- block registerable %} + {%- if security.registerable %} +

+ {% trans sitename=config.ACCOUNTS_SITENAME %}New to {{ sitename }}?{% endtrans %} + {{ _('Sign up') }} +

+ {%- endif %} + {%- endblock registerable %} +
+ +{%- block recoverable %} +{%- if security.recoverable %} +
+ {{ _('Forgot password?') }} +
+{%- endif %} +{%- endblock recoverable %} +{% endblock page_body %}