From 562a3cf412fb35591c10b21af19e438e3f1ef3b0 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 | 15 +++++++++++++++ 3 files changed, 18 insertions(+) diff --git a/src/settingsCategories.js b/src/settingsCategories.js index ddf48c36..f723f3f0 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..b39752ba 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..f7aa5c4f 100644 --- a/src/settingsKeyMapping.js +++ b/src/settingsKeyMapping.js @@ -438,6 +438,21 @@ 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',