webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/WebhookForm.js in foreman_webhooks-2.0.2 vs webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/WebhookForm.js in foreman_webhooks-2.0.3

- old
+ new

@@ -23,10 +23,12 @@ initialValues, templates, availableEvents, isTemplatesLoading, isEventsLoading, + isPasswordDisabled, + setIsPasswordDisabled, }) => { const webhookTemplates = templates.map(t => ({ value: t.id, label: t.name })); const [activeTab, setActiveTab] = useState(0); const handleTabClick = (event, tabIndex) => { @@ -49,10 +51,12 @@ webhookTemplates={webhookTemplates} httpMethods={HTTP_METHODS} availableEvents={availableEvents} isEventsLoading={isEventsLoading} isTemplatesLoading={isTemplatesLoading} + isPasswordDisabled={isPasswordDisabled} + setIsPasswordDisabled={setIsPasswordDisabled} /> </ForemanForm> ); }; @@ -62,8 +66,15 @@ initialValues: PropTypes.object.isRequired, templates: PropTypes.array.isRequired, availableEvents: PropTypes.array.isRequired, isEventsLoading: PropTypes.bool.isRequired, isTemplatesLoading: PropTypes.bool.isRequired, + isPasswordDisabled: PropTypes.bool, + setIsPasswordDisabled: PropTypes.func, +}; + +WebhookForm.defaultProps = { + isPasswordDisabled: false, + setIsPasswordDisabled: undefined, }; export default WebhookForm;