Skip to content

Commit

Permalink
Render title and description.
Browse files Browse the repository at this point in the history
  • Loading branch information
robgietema committed Sep 30, 2024
1 parent 56eae8a commit b6a8e48
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ class Edit extends Component {

return (
<>
{data.title && <h2>{data.title}</h2>}
{data.description && (
<p className="documentDescription">{data.description}</p>
)}
<Form
schema={{
fieldsets: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,21 @@ const FormBlockView = ({ data, id, properties, metadata, path }) => {
};

return (
<Form
schema={data.schema}
formData={initialData}
onSubmit={onSubmit}
resetOnCancel={true}
onCancel={data.show_cancel ? onCancel : null}
submitLabel={data.submit_label || intl.formatMessage(messages.submit)}
cancelLabel={data.cancel_label || intl.formatMessage(messages.cancel)}
/>
<>
{data.title && <h2>{data.title}</h2>}
{data.description && (
<p className="documentDescription">{data.description}</p>
)}
<Form
schema={data.schema}
formData={initialData}
onSubmit={onSubmit}
resetOnCancel={true}
onCancel={data.show_cancel ? onCancel : null}
submitLabel={data.submit_label || intl.formatMessage(messages.submit)}
cancelLabel={data.cancel_label || intl.formatMessage(messages.cancel)}
/>
</>
);
};

Expand Down

0 comments on commit b6a8e48

Please sign in to comment.