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 2450711 commit be28e95
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
14 changes: 7 additions & 7 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2023-08-24T10:48:48.806Z\n"
"PO-Revision-Date: 2023-08-24T10:48:48.806Z\n"
"POT-Creation-Date: 2024-05-30T13:11:40.739Z\n"
"PO-Revision-Date: 2024-05-30T13:11:40.739Z\n"

msgid "Failed to load: {{error}}"
msgstr "Failed to load: {{error}}"
Expand Down Expand Up @@ -680,9 +680,6 @@ msgstr "TLS"
msgid "Email sender"
msgstr "Email sender"

msgid "The address that outgoing messages are sent from."
msgstr "The address that outgoing messages are sent from."

msgid "Send me a test email"
msgstr "Send me a test email"

Expand Down Expand Up @@ -725,8 +722,11 @@ msgstr "6 months"
msgid "12 months"
msgstr "12 months"

msgid "Enable password expiry alerts"
msgstr "Enable password expiry alerts"
msgid "Send reminders to users before their password expires"
msgstr "Send reminders to users before their password expires"

msgid "Number of days before password expiry to send reminder (1–28)"
msgstr "Number of days before password expiry to send reminder (1–28)"

msgid "Minimum characters in password"
msgstr "Minimum characters in password"
Expand Down
1 change: 1 addition & 0 deletions src/settingsCategories.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,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 @@ -557,9 +557,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 be28e95

Please sign in to comment.