From 3879680a271d433ef82c99269eaedc9a8bb189fc Mon Sep 17 00:00:00 2001 From: Martin Paul Eve Date: Wed, 18 Dec 2024 15:40:46 +0000 Subject: [PATCH] Add option to toggle credit --- src/core/logic.py | 2 +- src/templates/admin/elements/forms/group_journal.html | 4 ++++ src/utils/install/journal_defaults.json | 6 +++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/core/logic.py b/src/core/logic.py index 98268f3ae4..b5e3fbfca1 100755 --- a/src/core/logic.py +++ b/src/core/logic.py @@ -455,7 +455,7 @@ def get_settings_to_edit(display_group, journal, user): 'use_ga_four', 'display_login_page_notice', 'login_page_notice', 'display_register_page_notice', 'register_page_notice', 'support_email', 'support_contact_message_for_staff', - 'from_address', 'replyto_address', + 'from_address', 'replyto_address', "use_credit" ] group_of_settings = process_setting_list(journal_settings, 'general', journal) diff --git a/src/templates/admin/elements/forms/group_journal.html b/src/templates/admin/elements/forms/group_journal.html index 09d6444611..ff59b01c0d 100644 --- a/src/templates/admin/elements/forms/group_journal.html +++ b/src/templates/admin/elements/forms/group_journal.html @@ -87,6 +87,10 @@

Other

If you want to display a special message on the registration page you can add it here.

{% include "admin/elements/forms/field.html" with field=edit_form.display_register_page_notice %} {% include "admin/elements/forms/field.html" with field=edit_form.register_page_notice %} + +

If you want to toggle CRediT support, you can do so here.

+ {% include "admin/elements/forms/field.html" with field=edit_form.display_use_credit %} + {% include "admin/elements/forms/field.html" with field=edit_form.use_credit %} diff --git a/src/utils/install/journal_defaults.json b/src/utils/install/journal_defaults.json index 9325d76902..84d8fde26b 100644 --- a/src/utils/install/journal_defaults.json +++ b/src/utils/install/journal_defaults.json @@ -5146,6 +5146,10 @@ }, "value": { "default": "on" - } + }, + "editable_by": [ + "editor", + "journal-manager" + ] } ]