Skip to content

Commit

Permalink
fix: acrs and logging fields are not saving #222
Browse files Browse the repository at this point in the history
  • Loading branch information
duttarnab committed Sep 19, 2021
1 parent 6221ff1 commit d1f0add
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions plugins/auth-server/components/Configuration/Defaults/AcrsPage.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useEffect } from 'react'
import { Form, Button } from '../../../../../app/components'
import { Form, Button, FormGroup, Col, CustomInput } from '../../../../../app/components'
import { Formik } from 'formik'
import GluuLabel from '../../../../../app/routes/Apps/Gluu/GluuLabel'
import { connect } from 'react-redux'
import { getAcrsConfig, editAcrs } from '../../../redux/actions/AcrsActions'
import {
Expand All @@ -9,7 +10,6 @@ import {
ACR_WRITE,
} from '../../../../../app/utils/PermChecker'
import { SIMPLE_PASSWORD_AUTH } from '../../../common/Constants'
import GluuSelectRow from '../../../../../app/routes/Apps/Gluu/GluuSelectRow'
import GluuViewWrapper from '../../../../../app/routes/Apps/Gluu/GluuViewWrapper'
import GluuLoader from '../../../../../app/routes/Apps/Gluu/GluuLoader'
import { useTranslation } from 'react-i18next'
Expand Down Expand Up @@ -40,16 +40,25 @@ function AcrsPage({ acrs, scripts, permissions, loading, dispatch }) {
>
{(formik) => (
<Form onSubmit={formik.handleSubmit}>
<GluuSelectRow
label="fields.default_acr"
name="defaultAcr"
value={acrs.defaultAcr}
formik={formik}
lsize={4}
rsize={8}
values={authScripts}
required
></GluuSelectRow>
<FormGroup row>
<GluuLabel label="fields.default_acr" size={4} />
<Col sm={8}>
<CustomInput
type="select"
id="defaultAcr"
name="defaultAcr"
value={acrs.defaultAcr}
onChange={formik.handleChange}
>
<option value="">{t('actions.choose')}...</option>
{authScripts.map((item, key) => (
<option value={item} key={key}>
{item}
</option>
))}
</CustomInput>
</Col>
</FormGroup>

{hasPermission(permissions, ACR_WRITE) && (
<Button color="primary" type="submit">
Expand Down

0 comments on commit d1f0add

Please sign in to comment.