Skip to content

Commit

Permalink
Added default button labels to data-driven-form.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyperkid123 committed Dec 5, 2018
1 parent 250dfcd commit 754760d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/javascript/forms/data-driven-form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ import React from 'react';
import FormRender from '@data-driven-forms/react-form-renderer';
import { formFieldsMapper, layoutMapper } from '@data-driven-forms/pf3-component-mapper';

const buttonLabels = {
submitLabel: __('Save'),
resetLabel: __('Reset'),
cancelLabel: __('Cancel'),
};

const MiqFormRenderer = props => (
<FormRender
formFieldsMapper={formFieldsMapper}
Expand All @@ -10,6 +16,7 @@ const MiqFormRenderer = props => (
'pristine',
'invalid',
]}
{...buttonLabels}
{...props}
/>
);
Expand Down

0 comments on commit 754760d

Please sign in to comment.