{
+ const {
+ id,
+ form,
+ handleSubmit,
+ onClear,
+ onCancel,
+ style,
+ paddingClasses,
+ intl,
+ children,
+ } = formRenderProps;
+
+ const handleCancel = () => {
+ // reset the final form to initialValues
+ form.reset();
+ onCancel();
+ };
+
+ const clear = intl.formatMessage({ id: 'FilterForm.clear' });
+ const cancel = intl.formatMessage({ id: 'FilterForm.cancel' });
+ const submit = intl.formatMessage({ id: 'FilterForm.submit' });
+
+ const classes = classNames(css.root);
+
+ return (
+
+ );
+ }}
+ />
+ );
+};
+
+FilterFormComponent.defaultProps = {
+ liveEdit: false,
+ style: null,
+ onCancel: null,
+ onChange: null,
+ onClear: null,
+ onSubmit: null,
+};
+
+FilterFormComponent.propTypes = {
+ liveEdit: bool,
+ onCancel: func,
+ onChange: func,
+ onClear: func,
+ onSubmit: func,
+ style: object,
+ children: node.isRequired,
+
+ // form injectIntl
+ intl: intlShape.isRequired,
+};
+
+const FilterForm = injectIntl(FilterFormComponent);
+
+export default FilterForm;
diff --git a/src/forms/index.js b/src/forms/index.js
index 399596fa..198f53de 100644
--- a/src/forms/index.js
+++ b/src/forms/index.js
@@ -9,6 +9,7 @@ export { default as EditListingPoliciesForm } from './EditListingPoliciesForm/Ed
export { default as EditListingPricingForm } from './EditListingPricingForm/EditListingPricingForm';
export { default as EmailVerificationForm } from './EmailVerificationForm/EmailVerificationForm';
export { default as EnquiryForm } from './EnquiryForm/EnquiryForm';
+export { default as FilterForm } from './FilterForm/FilterForm';
export { default as LocationSearchForm } from './LocationSearchForm/LocationSearchForm';
export { default as LoginForm } from './LoginForm/LoginForm';
export { default as PasswordChangeForm } from './PasswordChangeForm/PasswordChangeForm';
diff --git a/src/translations/en.json b/src/translations/en.json
index ec37bd63..2035811a 100644
--- a/src/translations/en.json
+++ b/src/translations/en.json
@@ -256,6 +256,9 @@
"FieldReviewRating.star3": "OK - 3 stars",
"FieldReviewRating.star4": "Good - 4 stars",
"FieldReviewRating.star5": "Awesome - 5 stars",
+ "FilterForm.cancel": "Cancel",
+ "FilterForm.clear": "Clear",
+ "FilterForm.submit": "Apply",
"Footer.copyright": "© Sharetribe",
"Footer.goToFacebook": "Go to Facebook page",
"Footer.goToInstagram": "Go to Instagram page",