-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into DHIS2-15704/password-regex-validation
- Loading branch information
Showing
18 changed files
with
410 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 73 additions & 10 deletions
83
...ss/fixtures/network/42/show_tiles_with_list_and_add_action_to_all_available_sections.json
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
{ | ||
"count": 415, | ||
"totalResponseSize": 434461, | ||
"duplicates": 316, | ||
"count": 401, | ||
"totalResponseSize": 310570, | ||
"duplicates": 307, | ||
"nonDeterministicResponses": 24, | ||
"apiVersion": "42", | ||
"fixtureFiles": [ | ||
"static_resources.json", | ||
"show_tiles_with_list_and_add_action_to_all_available_sections.json", | ||
"the_app_has_a_main_navigation.json", | ||
"user_roles_can_be_listed.json", | ||
"the_user_role_list_can_be_searched.json", | ||
"users_can_be_listed.json", | ||
"the_user_list_can_be_searched.json", | ||
"user_groups_can_be_listed.json", | ||
"the_user_group_list_can_be_searched.json" | ||
"the_user_group_list_can_be_searched.json", | ||
"user_roles_can_be_listed.json", | ||
"the_user_role_list_can_be_searched.json" | ||
] | ||
} |
4 changes: 2 additions & 2 deletions
4
cypress/fixtures/network/42/the_app_has_a_main_navigation.json
Large diffs are not rendered by default.
Oops, something went wrong.
18 changes: 9 additions & 9 deletions
18
cypress/fixtures/network/42/the_user_group_list_can_be_searched.json
Large diffs are not rendered by default.
Oops, something went wrong.
149 changes: 138 additions & 11 deletions
149
cypress/fixtures/network/42/the_user_list_can_be_searched.json
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
cypress/fixtures/network/42/the_user_role_list_can_be_searched.json
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,3 +75,4 @@ | |
.errorNoticeBox { | ||
max-width: 500px; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import i18n from '@dhis2/d2-i18n' | ||
import { | ||
IconCheckmarkCircle16, | ||
colors, | ||
IconWarning16, | ||
IconInfo16, | ||
} from '@dhis2/ui' | ||
import PropTypes from 'prop-types' | ||
import React from 'react' | ||
import styles from './UserForm.module.css' | ||
|
||
const EmailStatusMessage = ({ emailVerified, enforceVerifiedEmail }) => { | ||
let icon | ||
let color | ||
let message | ||
|
||
if (enforceVerifiedEmail) { | ||
if (emailVerified) { | ||
color = colors.green600 | ||
icon = IconCheckmarkCircle16 | ||
message = i18n.t('This user email has been verified.') | ||
} | ||
if (!emailVerified) { | ||
color = colors.red600 | ||
icon = IconWarning16 | ||
message = i18n.t('This user does not have a verified email.') | ||
} | ||
} else { | ||
if (!emailVerified) { | ||
color = colors.default | ||
icon = IconInfo16 | ||
message = i18n.t('This user does not have a verified email') | ||
} | ||
if (emailVerified) { | ||
color = colors.green600 | ||
icon = IconCheckmarkCircle16 | ||
message = i18n.t('This user email has been verified.') | ||
} | ||
} | ||
|
||
return ( | ||
<div className={styles.statusMessage}> | ||
<span>{React.createElement(icon, { color })}</span> | ||
<div style={{ color }}>{message}</div> | ||
</div> | ||
) | ||
} | ||
|
||
EmailStatusMessage.propTypes = { | ||
emailVerified: PropTypes.bool.isRequired, | ||
enforceVerifiedEmail: PropTypes.bool.isRequired, | ||
} | ||
|
||
export default EmailStatusMessage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters