-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚧 [#4908] Add service configuration option
- Loading branch information
1 parent
588d883
commit 26590e7
Showing
4 changed files
with
70 additions
and
17 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
5 changes: 0 additions & 5 deletions
5
src/openforms/js/components/admin/form_design/registrations/json/fields/Service.js
This file was deleted.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
src/openforms/js/components/admin/form_design/registrations/json/fields/ServiceSelect.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import PropTypes from 'prop-types'; | ||
import {FormattedMessage} from 'react-intl'; | ||
|
||
import Field from 'components/admin/forms/Field'; | ||
import FormRow from 'components/admin/forms/FormRow'; | ||
import ReactSelect from 'components/admin/forms/ReactSelect'; | ||
|
||
const ServiceSelect = ({options}) => { | ||
return ( | ||
<FormRow> | ||
<Field | ||
name="serviceSelect" | ||
label={ | ||
<FormattedMessage | ||
description="JSON registration options 'serviceSelect' label" | ||
defaultMessage="Service" | ||
/> | ||
} | ||
> | ||
<ReactSelect | ||
name="serviceSelect" | ||
options={options} | ||
required | ||
/> | ||
</Field> | ||
</FormRow> | ||
); | ||
}; | ||
|
||
ServiceSelect.propTypes = { | ||
options: PropTypes.arrayOf( | ||
PropTypes.shape({ | ||
value: PropTypes.string.isRequired, | ||
label: PropTypes.node.isRequired, | ||
}) | ||
).isRequired, | ||
}; | ||
|
||
export default ServiceSelect; |