Skip to content

Commit

Permalink
fix(admin-ui): problem in saving some fields #221
Browse files Browse the repository at this point in the history
  • Loading branch information
syntrydy committed Sep 29, 2021
1 parent 5b5da26 commit 61b3cb4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions app/routes/Apps/Gluu/GluuInlineInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function GluuInlineInput({
})(Tooltip)
const [show, setShow] = useState(false)
const [correctValue, setCorrectValue] = useState([])
const [data, setData] = useState(value)
const onValueChanged = () => {
setShow(true)
}
Expand All @@ -57,11 +58,12 @@ function GluuInlineInput({
}
patch['op'] = 'replace'
handler(patch)
setShow(false)
setShow(!show)
setData(document.getElementById(name).value)
}
const onCancel = () => {
setCorrectValue([])
setShow(false)
setShow(!show)
}
return (
<FormGroup row>
Expand All @@ -75,7 +77,7 @@ function GluuInlineInput({
id={name}
name={name}
type={type}
defaultValue={value}
defaultValue={data}
onChange={onValueChanged}
/>
</GluuTooltip>
Expand Down Expand Up @@ -112,14 +114,14 @@ function GluuInlineInput({
</Col>
<Col sm={2}>
{show && (
<div>
<>
<Button color="primary" size="sm" onClick={onAccept}>
<i className="fa fa-check mr-2"></i>
</Button>{' '}
<Button color="danger" size="sm" onClick={onCancel}>
<i className="fa fa-times mr-2"></i>
</Button>
</div>
</>
)}
</Col>
</FormGroup>
Expand Down
2 changes: 1 addition & 1 deletion plugins/auth-server/redux/api/OIDCApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default class OIDCApi {
deletable: false,
}
return new Promise((resolve, reject) => {
// data['client'] = client
// data['client'] = client
this.api.postOauthOpenidClients(data, (error, res) => {
if (error) {
reject(error)
Expand Down

0 comments on commit 61b3cb4

Please sign in to comment.