Skip to content

Commit

Permalink
Merge pull request #371 from GluuFederation/admin-ui-issue-363
Browse files Browse the repository at this point in the history
fix(admin-ui): change password payload changed
  • Loading branch information
duttarnab authored Aug 18, 2022
2 parents 695f442 + e5d756c commit cadd7a3
Showing 1 changed file with 22 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,15 @@ function UserForm({ formik }) {

const submitChangePassword = () => {
const submitableValue = {
userPassword: formik.values.userPassword,
inum: userDetails.inum,
jsonPatchString: '[]',
customAttributes: [
{
name: 'userPassword',
multiValued: false,
values: [formik.values.userPassword],
},
],
}
dispatch(changeUserPassword(submitableValue))
toggleChangePasswordModal()
Expand Down Expand Up @@ -89,7 +96,9 @@ function UserForm({ formik }) {
const tempList = [...selectedClaims]
for (const i in userDetails.customAttributes) {
if (userDetails.customAttributes[i].values) {
const data = getCustomAttributeById(userDetails.customAttributes[i].name)
const data = getCustomAttributeById(
userDetails.customAttributes[i].name,
)
if (
data &&
!usedClaimes.includes(userDetails.customAttributes[i].name)
Expand Down Expand Up @@ -169,16 +178,16 @@ function UserForm({ formik }) {
</ModalBody>
<ModalFooter>
{formik.values?.userPassword?.length > 3 &&
formik.values?.userPassword ==
formik.values.userConfirmPassword && (
<Button
color={`primary-${selectedTheme}`}
type="button"
onClick={() => submitChangePassword()}
>
{t('actions.change_password')}
</Button>
)}
formik.values?.userPassword ==
formik.values.userConfirmPassword && (
<Button
color={`primary-${selectedTheme}`}
type="button"
onClick={() => submitChangePassword()}
>
{t('actions.change_password')}
</Button>
)}
&nbsp;
<Button
color={`primary-${selectedTheme}`}
Expand Down Expand Up @@ -340,10 +349,7 @@ function UserForm({ formik }) {
{/* For Space in buttons */}
&nbsp; &nbsp; &nbsp;
{/* For Space in buttons */}
<Button
color={`primary-${selectedTheme}`}
type="submit"
>
<Button color={`primary-${selectedTheme}`} type="submit">
<i className="fa fa-check-circle mr-2"></i>
{t('actions.save')}
</Button>
Expand Down

0 comments on commit cadd7a3

Please sign in to comment.