-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(admin-ui): work on user add form and attributes picker
- Loading branch information
Showing
5 changed files
with
156 additions
and
26 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
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,58 @@ | ||
import React from 'react' | ||
import { Col, FormGroup, Input } from 'Components' | ||
import GluuLabel from './GluuLabel' | ||
import GluuTooltip from './GluuTooltip' | ||
function GluuRemovableInputRow({ | ||
label, | ||
name, | ||
type, | ||
value, | ||
formik, | ||
required, | ||
lsize, | ||
rsize, | ||
handler, | ||
doc_category, | ||
}) { | ||
return ( | ||
<GluuTooltip doc_category={doc_category} doc_entry={name}> | ||
<FormGroup row> | ||
<GluuLabel label={label} size={lsize} required={required} /> | ||
<Col sm={rsize - 1}> | ||
<Input | ||
id={name} | ||
data-testid={name} | ||
type={type} | ||
name={name} | ||
defaultValue={value} | ||
onChange={formik.handleChange} | ||
/> | ||
</Col> | ||
<div | ||
style={{ | ||
float: 'right', | ||
justifyContent: 'center', | ||
cursor: 'pointer', | ||
padding: '5px', | ||
width: '25px', | ||
height: '25px', | ||
marginTop: '0px', | ||
marginRight: '-10px', | ||
}} | ||
onClick={handler} | ||
> | ||
<i className={'fa fa-fw fa-close'} style={{color:"red"}}></i> | ||
</div> | ||
</FormGroup> | ||
</GluuTooltip> | ||
) | ||
} | ||
|
||
GluuRemovableInputRow.defaultProps = { | ||
type: 'text', | ||
lsize: 3, | ||
rsize: 9, | ||
required: false, | ||
} | ||
|
||
export default GluuRemovableInputRow |
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,68 @@ | ||
import React from 'react' | ||
import GluuLabel from './GluuLabel' | ||
import { Col, FormGroup, CustomInput, InputGroup } from 'Components' | ||
import { useTranslation } from 'react-i18next' | ||
import GluuTooltip from './GluuTooltip' | ||
|
||
function GluuRemovableSelectRow({ | ||
label, | ||
name, | ||
value, | ||
formik, | ||
values, | ||
lsize, | ||
rsize, | ||
handler, | ||
doc_category, | ||
}) { | ||
const { t } = useTranslation() | ||
return ( | ||
<GluuTooltip doc_category={doc_category} doc_entry={name}> | ||
<FormGroup row> | ||
<GluuLabel label={label} size={lsize} /> | ||
<Col sm={rsize - 1}> | ||
<InputGroup> | ||
<CustomInput | ||
type="select" | ||
id={name} | ||
data-testid={name} | ||
name={name} | ||
defaultValue={value} | ||
onChange={formik.handleChange} | ||
> | ||
<option value="">{t('actions.choose')}...</option> | ||
{values.map((item, key) => ( | ||
<option value={item} key={key}> | ||
{item} | ||
</option> | ||
))} | ||
</CustomInput> | ||
</InputGroup> | ||
</Col> | ||
<div | ||
style={{ | ||
float: 'right', | ||
justifyContent: 'center', | ||
cursor: 'pointer', | ||
padding: '5px', | ||
width: '25px', | ||
height: '25px', | ||
marginTop: '0px', | ||
marginRight: '-10px', | ||
}} | ||
onClick={handler} | ||
> | ||
<i className={'fa fa-fw fa-close'} style={{color:"red"}}></i> | ||
</div> | ||
</FormGroup> | ||
</GluuTooltip> | ||
) | ||
} | ||
|
||
GluuRemovableSelectRow.defaultProps = { | ||
values: [], | ||
lsize: 3, | ||
rsize: 9, | ||
} | ||
|
||
export default GluuRemovableSelectRow |
34 changes: 12 additions & 22 deletions
34
admin-ui/plugins/admin/components/UserManagement/UserClaimEntry.js
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