Skip to content

Commit

Permalink
fix: credentialsExpiresReminderInDays [DHIS2-13866]
Browse files Browse the repository at this point in the history
  • Loading branch information
tomzemp committed May 30, 2024
1 parent c22ffba commit 48df139
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/settingsCategories.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export const categories = {
'keyAllowObjectAssignment',
'credentialsExpires',
'credentialsExpiryAlert',
'credentialsExpiresReminderInDays',
'minPasswordLength',
'corsWhitelist',
'recaptchaSite',
Expand Down
3 changes: 3 additions & 0 deletions src/settingsFields.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@ class SettingsFields extends React.Component {
...addConditionallyHiddenStyles(mapping),
},
hintText: mapping.hintText,
type: mapping.inputType,
min: mapping.minValue,
max: mapping.maxValue,
},
validators,
}
Expand Down
15 changes: 14 additions & 1 deletion src/settingsKeyMapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -553,9 +553,22 @@ const settingsKeyMapping = {
},
},
credentialsExpiryAlert: {
label: i18n.t('Enable password expiry alerts'),
label: i18n.t('Send reminders to users before their password expires'),
type: 'checkbox',
},
credentialsExpiresReminderInDays: {
label: i18n.t(
'Number of days before password expiry to send reminder (1–28)'
),
type: 'textfield',
inputType: 'number',
minValue: 1,
maxValue: 28,
hideWhen: {
settingsKey: 'credentialsExpiryAlert',
settingsValue: 'false',
},
},
minPasswordLength: {
label: i18n.t('Minimum characters in password'),
type: 'dropdown',
Expand Down

0 comments on commit 48df139

Please sign in to comment.