From d92b4d16309dde9c72bc9ce8ee609167e3212544 Mon Sep 17 00:00:00 2001 From: Mozafar Haider Date: Fri, 8 Mar 2024 16:48:02 +0000 Subject: [PATCH] feat(DHIS2-16944): add login page settings --- src/settingsCategories.js | 2 ++ src/settingsFields.component.js | 1 + src/settingsKeyMapping.js | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+) diff --git a/src/settingsCategories.js b/src/settingsCategories.js index ddf48c36..77df0eda 100644 --- a/src/settingsCategories.js +++ b/src/settingsCategories.js @@ -94,6 +94,8 @@ export const categories = { 'keyRequireAddToView', 'keyUseCustomLogoFront', 'keyUseCustomLogoBanner', + 'loginPageLayout', + 'loginPageTemplate' ], }, email: { diff --git a/src/settingsFields.component.js b/src/settingsFields.component.js index a5a1629f..b4a38408 100644 --- a/src/settingsFields.component.js +++ b/src/settingsFields.component.js @@ -323,6 +323,7 @@ class SettingsFields extends React.Component { min: mapping.minValue, max: mapping.maxValue, helpText: mapping.helpText, + rowsMax: mapping.rowsMax }, validators, } diff --git a/src/settingsKeyMapping.js b/src/settingsKeyMapping.js index e105349e..a880abf3 100644 --- a/src/settingsKeyMapping.js +++ b/src/settingsKeyMapping.js @@ -438,6 +438,25 @@ const settingsKeyMapping = { label: i18n.t('Require authority to add to view object lists'), type: 'checkbox', }, + loginPageLayout: { + label: i18n.t( + 'Login page theme' + ), + type: 'dropdown', + options: { + DEFAULT: i18n.t('Default'), + SIDEBAR: i18n.t('Sidebar'), + CUSTOM: i18n.t('Custom'), + }, + }, + loginPageTemplate: { + label: i18n.t( + 'Login page template' + ), + multiLine: true, + hintText: i18n.t('Paste the content of your HTML template'), + rowsMax: 10 + }, keyUseCustomLogoFront: { label: i18n.t('Custom login page logo'), type: 'staticContent',