setFieldValue(field.name, selected[0]?.value)
}
@@ -72,34 +103,38 @@ const ForemanFormikField = ({
break;
case 'password':
content = setDisabled ? (
-
- {passwordInput}
-
-
-
+
+
+
+
+
+
) : (
passwordInput
);
break;
- default:
+ case 'checkbox':
content = (
-
);
+ break;
+ default:
+ throw new Error('Unsupported input type.');
}
return (
{content}
@@ -125,7 +162,7 @@ ForemanFormikField.propTypes = {
type: PropTypes.string.isRequired,
required: PropTypes.bool,
label: PropTypes.string.isRequired,
- labelHelp: PropTypes.string,
+ labelHelp: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
inputSizeClass: PropTypes.string,
labelSizeClass: PropTypes.string,
rows: PropTypes.number,
diff --git a/webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/WebhookForm.js b/webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/WebhookForm.js
index 91c0cb5..682fa21 100644
--- a/webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/WebhookForm.js
+++ b/webpack/ForemanWebhooks/Routes/Webhooks/Components/WebhookForm/WebhookForm.js
@@ -44,6 +44,7 @@ const WebhookForm = ({
onCancel={onCancel}
enableReinitialize
item={WEBHOOK_ITEM}
+ isPF5
>